Sabai Discuss No Seo Titles

#33805
  • Resolved Chris
    Rank Math free

    I noticed this page; https://support.rankmath.com/ticket/no-seo-title-for-sabai-listing-page/ for the Sabai directory plugin, I’m using the Sabai Discuss plugin but it won’t generate SEO titles/meta descriptions with RankMath and they advise moving to Allinone or Yoast.

    Does anyone know how to edit the directory Sabai code in the previous post linked to work with Sabai discuss?

    I’d rather stay with RankMath

    • This topic was modified 4 years, 11 months ago by Chris.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Chris
    Rank Math free

    Hello,

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

    Thank you.

    Chris
    Rank Math free

    Hello,

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

    Thank you.

    Todd
    Rank Math free

    Hi Chris,

    Thanks for getting in touch with us.

    Please share this code with the Sabai dev. team:
    https://support.rankmath.com/ticket/no-seo-title-for-sabai-listing-page/?view=all#post-13664

    They will be able to change the code to reflect the accurate variables for their Discuss plugin.

    If any input is needed from our end, please do not hesitate to let us know.

    Chris
    Rank Math free

    I managed to get halfway done myself with this;

    /**
     * Filter to change the page title.
     * 
     * @param string $title
     */
    add_filter( 'rank_math/frontend/title', function( $title ) {
    	
    	if(is_sabai_discuss_question()){
    	global $post;
    	return $post->title;
    	}
    	return $title;
    });
    
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	if(is_sabai_discuss_question()){
    	global $post;
    	$sabai_post = get_post($post->ID);
    	$sabai_entity = $GLOBALS['sabai_entity'];
    	  //return Entity_RenderField($sabai_entity, 'content_body', 'summary');
    	  return $sabai_post->post_content;
    	}
    	return $description;
    });
    
    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if(is_sabai_discuss_question()){
    		$robots['index'] = 'index';
    	}
    	return $robots;
    });

    But Support is slow from Sabai Discuss. If anyone used Sabai discuss, this fixes the SEO titles. I doesn’t add a description unfortunately.

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you have been able to make some progress. Could you please test whether replacing the following line:
    return $sabai_post->post_content;

    with the following will have an effect on this issue:
    return $post->post_content;

    Looking forward to helping you. Thank you.

    ​​​​​​

    Chris
    Rank Math free

    No, unfortunately not 🙁 I tried inputting a description manually into the code and that worked. Thanks for the help but I see the plugin doesn’t even put the correct URL in the meta info either.

    I think the plugin is not ready for rank math.

    Todd
    Rank Math free

    Hi Chris,

    We are so sorry but we hope that the Sabai plugin developer will respond soon.

    If you need help with anything else, please open a new support ticket here so we can help.

    We are always here for assistance.

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

The ticket ‘Sabai Discuss No Seo Titles’ is closed to new replies.