Add NOODP to Robots, Problems with ODP Description

#21796
  • Resolved Javier MD
    Rank Math free

    Hello,

    I’m having a problem with the meta description that’s affecting my pages. Google is taking a text from my footer to show as meta description in the serp.

    – My page: https://ladodigital.es/
    – Search term to see the description that google shows: LadoDigital

    I have researched and everything is set up correctly on my page. I can only think of one thing:

    1. Block the description of the Open Directory Project, adding to the robots the label: NOODP.

    I couldn’t find this anywhere in Math Rank.

    Thanks.

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

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

    I have inspected your page source and Rank Math is generating the correct meta description as shown below:
    Meta info
    It may take sometime for Google to update the new description on its cache, searching for your site using site:https://ladodigital.es also shows the right description.

    I can suggest that you take a look at the following filter that you can use on your theme to target a certain page and add the Noodp & other robots meta attributes from your theme’s functions.php file:

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	return $robots;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Once I put that function in the functions.php file of my theme, I don’t know where I can place the NOODP tags
    Could you be more specific with a example?

    Hello,

    Thank you for contacting Rank Math today.

    Here is an example that you can use on your theme’s functions.php file to target the homepage:

    
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if ( is_front_page() ) {
    		$robots['index'] = 'index';
            $robots['max-snippet'] = 'max-snippet:-1';
    		$robots['max-video-preview'] = 'max-video-preview:-1';
    		$robots['max-image-preview'] = 'max-image-preview:large';
    		$robots['noodp'] = 'noodp';
    		
    	}
    	return $robots;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Great, thanks so much.

    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 5 replies - 1 through 5 (of 5 total)

The ticket ‘Add NOODP to Robots, Problems with ODP Description’ is closed to new replies.