Support

Home Forums Event Espresso Premium How to change Events archive page title (html head)

How to change Events archive page title (html head)

Posted: December 14, 2016 at 10:13 pm

Viewing 3 reply threads


SurreyHillsNC

December 14, 2016 at 10:13 pm

My client wanted to change “Events” to “Courses”. I found documentation to change the slug and category names/slug.

The page title still displays “Event” This is the page title in the header that is displayed in the top of the browser, not the H1

How do i change this?

http://surrey.dvize.net/courses/


Josh

  • Support Staff

December 14, 2016 at 10:18 pm

The title tag actually controlled by the theme. There’s a WordPress filter you can use to override what the Divi theme does though. Here’s a link to some example code:

https://gist.github.com/philipdowner/1263202


SurreyHillsNC

December 14, 2016 at 11:23 pm

i could not get that to work.. I tried
‘post_type’ => ‘espresso_events’
‘post_type’ => ‘events’
‘post_type’ => ‘courses’


Josh

  • Support Staff

December 14, 2016 at 11:44 pm

You can do this simpler solution then:

add_filter('pre_get_document_title', 'ee_events_archive_titles');

function ee_events_archive_titles() {
    if ( is_post_type_archive( 'espresso_events' ) ) {
        return 'welp! this is the title | my awesome website';
    }
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

Viewing 3 reply threads

The support post ‘How to change Events archive page title (html head)’ 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