Events Made Easy Forums Tips How to add placeholders to the title tag in events and locations

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #57017
    Anonymous
    Inactive

    Hi,

    How can I add the #_TOWN in the title tag?

    theres is a field or a function? or where I edit the code of the template to add this?

    thanks!

    #57021
    Franky
    Keymaster

    Changing the title of the page is currently not possible. I imagine a filter would help, but an easy wor around would be to use a page template without title and just add your own via the eme single format template

    #57026
    Anonymous
    Inactive

    thanks!
    that’s my solution:

    in functions.php delete auto title tag render feature:
    remove_action( 'wp_head', '_wp_render_title_tag', 1 );
    Then in options/others add the <title> at Extra event html headers
    To get the normal title at the normal pages, in the headers.php from your template add before de </header> tag:

    <?php if (!eme_is_events_page()) { ?>
    	<title><?php echo get_the_title().' | '.get_bloginfo( 'name' );  ?></title>
    <?php }?>

    there’s an eme_is_events_page() function similar for location pages?

    thanks!!!!

    #57028
    Franky
    Keymaster

    Thanks, I moved this to “Tips”!
    Btw: the same function can be used for locations.
    And also: check out eme_is_single_event_page(), eme_is_single_location_page() and their companions (in eme_functions.php)

    #57030
    Anonymous
    Inactive

    thanks!

    could you change the title to something like “add placeholders to the title tag in events and locations”?

    #61363
    Anonymous
    Inactive

    I just wanted to mention that this solved my issue as well — I was having issues getting Divi/Rank Math to play nicely with EME titles.

    I had to add a bit of code before your the remove_action( 'wp_head', '_wp_render_title_tag', 1 ); section to get it to work, but it finally did.

    The code I used was found on the RankMath site and is

    add_action( 'template_redirect', 'rankmath_disable_features' );
    function rankmath_disable_features() {
    if( is_page( '800' ) ) {
        remove_all_actions( 'rank_math/head' );
    }
    }

    Just wanted to share this in case anyone came across this looking for similar

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Tips’ is closed to new topics and replies.
Scroll to Top