Problems with published and updated date display in Google

  • Can you please advise how to remove the published date markup from your schema or make it the same with the updated date? This seems to be one of those cases where full schema doesn’t help as Google is always deciding to show the older published date even when the updated date is available.

    I checked other sites that show updated date and Google picks the recent date if they remove the publish date markup and only have the updated date or they are similar. The theme I use Kadence already fixed this but your plugin still adds published date markup.

    Example of an implementation that works well in Google with just updated date markup https://backlinko.com/seo-techniques

    I found some other sites that show both and Google is always picking the older date if it’s in the markup and this causes a lower CTR in the search results.

    Can you please advise how to remove the publish date markup from your plugin or make it the same with the updated date when it’s more recent?

    Thank you.

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

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

    The date published shown in SERPs is usually added to your posts/pages by your theme. Rank Math does not add it to your pages, so your best option would be disabling it in your theme or asking the theme support about how to remove it.

    I hope this info helps. Thank you.

    You are right. Solved. Thanks.

    Please see line 80 and 93 in view source code in the example page. It is RankMath adding datePublished schema.

    The theme is already showing correctly only the desired update date.

    • This reply was modified 2 weeks, 3 days ago by Adrian.

    Hello,

    Yes, Rank math adds the date published to the schema but this is not shown in the front end and usually added from your post date published as shown on your WordPress dashboard.

    This is only used for your site structured data and not sown in the SERPs

    Looking forward to helping you. Thank you.

    ​​​​​​

    When both published and updated dates are present Google is picking to show the older one.

    I would like a way to not have RankMath add a published date or update date Schema as I am adding it using the theme anyway.

    Thanks.

    Hello,

    Thank you for the follow up.

    I would not recommend removing the datePublished markup from your article as it is a required property in structured data(https://developers.google.com/search/docs/data-types/article). However, you can try the following filter if you don’t mind the error(I am assuming you are using article schema):

    
    /**
     * Filter to change the schema data.
     * Replace $schema_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_article_entity", function( $entity ) {
     global $post;
     
    if(isset($entity['datePublished']) || isset($entity['dateModified'])){
     unset($entity['datePublished']);
     unset($entity['dateModified']);
     return $entity;
      }
    
     return $entity;
    });
    

    Hope that helps. If you have any further question(s), please let us know. Thank you.

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

You must be logged in to reply to this ticket.