Handle Modified Date

#641414
  • Resolved Topfgartenwelt
    Rank Math free

    I think All in One SEO provides a function where I can choose on my own if the modified date in WordPress is updated or not, as you can see here: https://aioseo.com/docs/preventing-the-modified-date-for-content-from-changing/

    Is there a why to do that also in RankMath? I think this is a very important function especially after the new Google Helpful Content was rolled out and Google announced that the published / modified date should only change after a real change and not after some small adjustments.

    In my case I have often updated an article because of an link and I was hitten hard by the update.

    Greetings Kathrin

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

    Thank you for contacting Rank Math support and we apologize for the inconvenience.

    Rank Math does not have a feature that lets you choose when to update the modified date of your posts. However, there are some ways to work around this problem.

    Google uses the modified date from your content and your structured data to determine how fresh your posts are. If you want to prevent Google from seeing the modified date, you need to remove it from both places.

    To remove the modified date from your structured data, you can add a filter code to your website. This code will unset the dateModified property from your article schema. Here’s the code you need to add:

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

    To remove the modified date from your open graph metadata, you can add another filter code to your website. This code will disable the og:updated_time and article:modified_time tags from your Facebook metadata. Here’s the code you need to add:

    add_filter( 'rank_math/opengraph/facebook/og_updated_time', '__return_false');
    add_filter( 'rank_math/opengraph/facebook/article_modified_time', '__return_false');

    To remove the modified date from your sitemap, you can add a third filter code to your website. This code will remove the lastmod attribute from your sitemap index entries. Here’s the code you need to add:

    /**
     * Filter to remove lastmod from sitemap index
     */
    add_filter( 'rank_math/sitemap/index/entry', function( $index, $type ) {
        if ( isset( $index['lastmod'] ) ) {
    		unset( $index['lastmod'] );
    	}
    	return $index;
    }, 10, 2 );

    You can also block search engines from accessing your feeds, which may contain the modified date. To do this, you can add a rule to your robots.txt file that disallows crawling of your feed URLs. Here’s the rule you need to add:

    User-Agent: *
    Disallow: /feed/

    These steps should help you remove the modified date data from your website completely. However, you should also make sure that your theme does not display the modified date in your content. If it does, you should contact your theme developer and ask them how to remove it.

    We hope this helps you resolve your issue. Thank you for choosing Rank Math as your SEO plugin.

    Hi Great,

    thank you very much for your reply. What about to implement such feature like All in One SEO does offer it? I think concerning the new Google Helpful Content Update is that a must. All mentioned solutions have in common that the modified date isn’t updated or shown at all. If I do a large update I want to show Google and all of my readers that something has changed but not when I just correct small things. I can’t see that something like that would be possible with that code.

    Greetings Kathrin

    Hello,

    Thank you for getting back to us.

    In this case, you can use another plugin for this functionality. You can try this: https://wordpress.org/plugins/change-last-modified-date/. Please note that we have not tested the plugin.

    Thank you for your patience and cooperation

    Hi Great, I have this plugin already, but I think it will be outdated soon. But why you don’t want to implement such function. It would be great especially Google has a problem with the dates now.

    See the new Google Helpful Content Update:

    2. This new addition to the guidance is about faking an update to a page:

    “Are you changing the date of pages to make them seem fresh when the content has not substantially changed?”

    3. The last addition is also about faking freshness:

    “Are you adding a lot of new content or removing a lot of older content primarily because you believe it will help your search rankings overall by somehow making your site seem “fresh?” (No, it won’t)”

    Wordpress updates the modified date even when there is just a small change.

    Greetings Kathrin

    Hello,

    Thank you so much for your feedback.

    Allow me to share this with our developers. If this feature is something we can add, we will let you know.

    Thank you so much for your input.

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

    Hello,

    Thank you for your patience.

    Just a quick update that we have fixed this issue on one of our recent releases.

    You may also check our knowledgebase about the topic: https://rankmath.com/kb/prevent-modified-date-from-being-updated/

    Please update Rank Math & all other plugins, themes and WordPress to the latest version.

    The issue should be fixed.

    If not, please feel free to open a support topic or reply to this message and we will be more than happy to assist.

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

The ticket ‘Handle Modified Date’ is closed to new replies.