Support

Home Forums Event Espresso Premium Page title in the theme banner

Page title in the theme banner

Posted: July 18, 2017 at 3:47 am

Viewing 9 reply threads


AlphaStar

July 18, 2017 at 3:47 am

Hello. I am having trouble with the page titles. I contacted with the theme developer and they said it has something to be fixed by the plugin developer.

People Type pages:
https://alphastar.academy/people-type/full-time-instructor/ shows “PEOPLE TYPE: FULL TIME INSTRUCTOR” as the page title. I want it to be “FULL TIME INSTRUCTORS”

People Pages:
https://alphastar.academy/people/agurel/ shows “PAGE TITLE”. I want it to be the name of the person.

Event Pages:
https://alphastar.academy/events/scm17f-mca-1-8150/ shows “PAGE TITLE. I want it to be the name of the event.

Please help. Thanks in advance.


Tony

  • Support Staff

July 18, 2017 at 4:07 am

Hi there,

The theme controls almost all of the output, we inject event details into the_content, but all of the other output (including the titles) is controlled by the theme.

I contacted with the theme developer and they said it has something to be fixed by the plugin developer.

It’s easy for both them (and me) to simply say someone else needs to fix the problem however the page title is controlled by the theme, not EE.

Can you send me a copy of the theme so I can take a look at the code to see if I can spot the problem? You will need to host the zip somewhere and post either post a link here or email it to support[at]eventespresso.com (be sure to include a link to this thread within the email so we know what it is for).

I’ll take a look at the code but I want to be clear that this is most likely an issue with the theme and so will likely still need to be fixed by the author.


AlphaStar

July 18, 2017 at 4:26 am

Thanks a lot! I sent the email.


Tony

  • Support Staff

July 18, 2017 at 5:52 am

As expected, it’s the theme.

The title is called from \inc\templates\page-title.php

Which sets up a $custom_title and $front_title variable and passes it to the function thim_get_page_title() to build the title:

$heading_title = thim_get_page_title( $custom_title, $front_title );

thim_get_page_title() checks for specific posts types before setting the title, Event Espresso posts are none of those post types so it doesn’t get set and remains the default which is ‘Page Title’.

To fix this you’re going to need to create a child theme and override the thim_get_page_title() function within the child themes functions.php file.

Then within that function check for espresso_events and espresso_people post types, then return the post title.

Then for the People type listing check for ‘espresso_people_type’ using is_tax and return the term title.

So something like this: https://gist.github.com/Pebblo/c77a32f989f5fab97d0bd87bebd7ad9e

Note the above function should be considered untested and unsupported, I’ve quick checked it fixed the output for me on a test site but have not tested any other output so you’ll need to test this fully. You will likely find other areas that don’t show the ‘correct’ output for what you need due to how the theme determines what the title should be.


AlphaStar

July 18, 2017 at 10:04 pm

Thanks, worked perfectly. Two more if you don’t mind:

1. https://alphastar.academy/event-category/pmcb/ title comes as “EVENT CATEGORY: PRE-MATHCOUNTS BASIC”. I want to remove the “EVENT CATEGORY: ” part.
2. https://alphastar.academy/venues/mission-college/ page title.

Thanks in advanced. I appreciate your help!


Tony

  • Support Staff

July 19, 2017 at 2:27 am

I’ve updated my gist to include the espresso_venues post type and espresso_event_categories taxonomy.


AlphaStar

July 19, 2017 at 11:01 am

Thank you so much Tony!


Tony

  • Support Staff

July 19, 2017 at 11:10 am

You’re most welcome ๐Ÿ™‚

If you haven’t done so already, we would really appreciate if you could share your Event Espresso experience and maybe write a review of EE.

We have some ideas here: https://eventespresso.com/recommend-event-espresso/


AlphaStar

July 19, 2017 at 11:50 am

I’ve just left a review on WordPress. Thanks for reminding.


Tony

  • Support Staff

July 19, 2017 at 12:49 pm

Thank you for the review ๐Ÿ™‚

Please do let us know if you have any further problems.

Viewing 9 reply threads

The support post ‘Page title in the theme banner’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso