Rank Math / BuddyBoss Integration

#929532
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    The title is most likely being generated dynamically by BuddyBoss and isn’t attached to the physical page on the back end. That’s why the metadata you have added to the snippet editor isn’t being applied on the front end, ending in a 404.

    However, here’s a sample filter you can use and modify to get the title from the current member or topic:

    add_filter( 'rank_math/frontend/title', function( $title ) {
    	$url = home_url($_SERVER['REQUEST_URI']);
    	if(strpos($url, '/member/')) {
    	       return "";
    	}
    	return $title;
    });

    You may also get in touch with the BuddyBoss team so they can assist you with which function should you use to get the title of the dynamic pages and incorporate it with our filter code to avoid doing manual hard coding of the titles.

    And here’s a guide to adding the code to the website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.