No SEO Title for Sabai Listing (Page)

#13603
  • Resolved Imre
    Rank Math free
    Content AI Starter

    Hello,

    I use the Sabai Directory plugin. With Yoast the listing pages get the right SEO title and they are included in the XML sitemap. With RankSEO the titles of the listings are not generated correctly, and they are not in the sitemap.

    I tried the change the page title within the RankMath dashboard, but no success.

    Thank you.

    Regards,

    Imre

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

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

    From the Sabai plugin documentation, the plugin will automatically create a sitemap index at the following location:
    http://path-to-your-wordpress/sabai-sitemap-index.xml
    I would suggest that you submit this sitemap to your Google search console.

    To fix the missing meta title and noindex option, I have added the following code to your theme’s functions.php file:

    /**
     * Filter to change the page title.
     * 
     * @param string $title
     */
    add_filter( 'rank_math/frontend/title', function( $title ) {
    	
    	if(is_sabai_directory_listing()){
    	global $post;
    	return $post->title;
    	}
    	return $title;
    });
    
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	if(is_sabai_directory_listing()){
    	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_directory_listing()){
    		$robots['index'] = 'index';
    	}
    	return $robots;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Imre
    Rank Math free
    Content AI Starter

    Thank you very much for the excellent support. Another reason why I use RankMath on all of my sites now.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/?rate=5#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘No SEO Title for Sabai Listing (Page)’ is closed to new replies.