Hide date in Google

#125839
  • Hello,

    I would like to know how I can hide the date in ALL the contents that are indexed in Google?

    When I say content, I mean blog posts, products, pages, etc.

    Thanks!

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

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

    You can remove the published date value from the rich snippets by making use of the following code in your functions.php file on the root of your theme:

    add_filter( 'rank_math/snippet/rich_snippet_article_entity', function( $data ) {
    	unset( $data['datePublished'] );
    	return $data;
    }, 10, 1 );
    

    If the above code does not solve your issue, please contact your theme developer to help you remove the dates.

    Let me know how it goes.

    Looking forward to helping you.

    Thank you!

    Hello,

    Glad that helped.

    Do you have any other questions? Or do you want us to close this thread? In any case, we will be here if you have any other questions or issues in the future.

    Thank you.

    Hello,

    After 2 weeks of adding this code, all posts still show the date on Google.

    I have manually indexed some articles and products, so that they take the most recent version with the code.

    And even so, the date is still displayed in Google results.

    Could you help me?

    Thank you!

    Hello,

    The dates show in the SERPs is generated from your theme, not Rank math. You can try using the following CSS:

    
    .postmetadata {
        display: none;
    }
    

    I also recommend checking with your theme provider to make sure this is will work or assist you in the correct way as it may be different with your theme

    Hope this helps.

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

You must be logged in to reply to this ticket.