Remove homepage date from search results

#435797
  • Resolved Hassan Zaimoor
    Rank Math free

    Dears,
    I am writing about the issue of date appearing on Google search results for my homepage.
    I know you’ve addressed this issue multiple times, and according to you this is a theme issue not Rankmath.

    I’ve tried to replace Rankmath with another SEO plugin and date on my homepage in google results disappeared. Few days after I reinstalled rankmath again, the date in Google search result appeared again.

    I’ve tried MANY plugins to remove date, none of them worked. At this point I am desperate for a fix and I can’t find anything.
    Even the date showing on google search results is not mentioned anywhere on the page’s source code.

    Please look into it and let me know what can be done.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with removing the post modified date from your SEO description.

    Please try removing the dateModified schema by adding the following filter to your website:

    
    add_filter( "rank_math/snippet/rich_snippet_article_entity", function( $entity ) {
    unset( $schema['dateModified'] );
    return $entity;
    });
    

    You can follow this guide for how to add the code snippet to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps. Please let us know if you have questions.

    Thanks for your response, Nigel.
    Snippet added, I’ll wait a few days and see if anything changes on Google.

    Not sure but I understand this correctly but I think the snippet addresses dateModified for posts.
    My issue is with the homepage.

    Nigel
    Rank Math business

    Hello,

    Thank you for the details you pointed out. I have rewritten the snippet to work on the homepage. I tested it on my setup and it is working:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    		unset ($data['WebPage']['dateModified']);
    		//echo '<pre>',var_dump($data),'</pre>'; //troubleshooting line uncomment to view on frontend
    		return $data;
    	}, 99, 2);
    

    Please replace the previous snippet with the one above.

    Hope that helps. Please let us know if you have questions.

    Thanks. Code updated.
    Will get back to you in a few days if it works.

    The last snippet actually broke the website.
    I had to remove it.

    Nigel
    Rank Math business

    Hello,

    So sorry for the inconvenience. I forgot a troubleshooting line in the code which I meant to remove before sharing with you.

    Here is the snippet again with out the frontend schema output troubleshooting code:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    		unset ($data['WebPage']['dateModified']);
    		return $data;
    	}, 99, 2);
    

    I’ve also edited my previous answer in case someone else uses it.

    Hope that helps. Please let us know if you have questions.

    Hi Nigel,
    I am not sure if the snippet is working.
    We’re still facing the same issue in search results.

    Hello,

    It seems that dateModified is still mentioned in our schema but the date inside that property isn’t matching the current date displayed on the SERP so I am certain that Google isn’t referencing the date from our schema.

    Do you have any plugin that involves date? Such as event-related plugins?

    Also, can you please perform a deep cache clearing of your website including any server-level caching services?

    Looking forward to helping you on this one.

    Hassan Z.
    Rank Math pro
    Content AI Starter

    I tried disabling many plugins and I noticed the date only disappears when I disable “Rank Math SEO PRO”.

    Hello,

    Thank you for that information.

    Allow me to further check this with our dev team. We should get back to you shortly with an update/advice.

    We appreciate your time and patience on this one.

    Hello,

    Enabling or disabling the PRO plugin won’t make any difference on this because the PRO plugin doesn’t add any date HTML or Schema markup on top of the Free plugin that would create this situation.

    In fact, the PRO plugin is currently enabled and the cached version from Google also is shown with the PRO plugin and the date is not showing:
    Date SERPs

    The date might be there from a previous data entity in your HTML content or Schema markup and the algorithm is still showing it for some searches, but we don’t see the date you mentioned being outputted from our plugin at the moment.

    Don’t hesitate to get in touch if you have any other questions.

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

The ticket ‘Remove homepage date from search results’ is closed to new replies.