Remove published date from google results

#7163
  • Resolved Peter
    Rank Math free

    Appearing in google search results with a 2013 date is not good.

    How to remove dates?

    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.

    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 );

    I hope this info helps. Thank you.

    ​​​​​​​

    Peter
    Rank Math free

    Thank you Michael.

    I will try it and wait to see the effect to update this.

    HI Peter,

    Great! Let us know how this goes and if you would like some help with anything else.

    Thank you.

    If you theme has LAST MODIFIED DATE then you don’t need the hack unless the plugin changes the date

    Todd
    Rank Math free

    Hello,

    I wanted to add that the date field is added to your post by your theme. Rank Math does not add it to your pages. It only adds it to the OG tags which should not have any effect on whether Google picks that date or not.

    Please contact your theme developer for help removing the code related to dates from your theme.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Remove published date from google results’ is closed to new replies.