Unable to overwrite meta title

#396018
  • Resolved Erik Torres
    Rank Math free

    We have been working with The Events Calendar plugin and we are unable to change the meta title on a specific page. They helped us trying to override it with a filter:


    function filter_events_title( $title ) {
    if( tribe_context()->get( 'view_request' ) === 'default' ) {
    $title = 'Default view ';
    } elseif( tribe_context()->get( 'view_request' ) === 'list' ) {
    $title = 'List view';
    } elseif( tribe_context()->get( 'view_request' ) === 'month') {
    $title = 'Month event page';
    } elseif( tribe_context()->get( 'view_request' ) === 'day' ) {
    $title = 'Day event page';
    } elseif( tribe_context()->get( 'view_request' ) === 'summary' ) {
    $title = 'Summary event page';
    } elseif( tribe_context()->get( 'view_request' ) === 'photo' ) {
    $title = 'Photo event page';
    } elseif( tribe_context()->get( 'view_request' ) === 'map' ) {
    $title = 'Map event page';
    }
    return $title;
    }
    add_filter( 'tribe_events_title_tag', 'filter_events_title' );

    They have informed us that there is no issue when using other SEO plugins ( Yoast ) so was wondering if you could help us

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Please use this filter function to forcibly override the current meta title instead: https://rankmath.com/kb/filters-hooks-api-developer/#change-the-title

    Let us know how that goes.

    Looking forward to helping you.

    I have implemented the hook you recommended but still does not seem to be able to override it.

    
    add_filter( 'rank_math/frontend/title', function( $title ) {
      $title = 'test meta title';
    	return $title;
    });
    

    Hello,

    The filter seems to be working just fine from our end.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    We have a staging site, would access to that work?

    Hello,

    Yes, if the issue persists on the staging site, you can provide its admin login details in the sensitive data section.

    Looking forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Nigel
    Rank Math business

    Hello,

    The Rank Math meta title filter will not work on an event calendar listing page because The Events Calendar generates those pages dynamically. I decativated Rank Math and tested the filter you were provided by The Events Calendar support and the meta titles still were not updating so something else was blocking them. (Note: I reactivated Rank Math and removed the filter after troubleshooting)

    Please try a plugin/theme conflict test to check if the issue is caused by one of your extensions. If not The Events Calendar support may be better equipped to carry on troubleshooting.

    Hope that helps. Please let us know if you have questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Unable to overwrite meta title’ is closed to new replies.