• Resolved anilky

    (@anilky)


    Some SEO plugins like AIOSEO provide the option to not update the last modified date. (If only small edit is done, it’s not a good practice to update the date.) Does RankMath provide such option to not update the last modified date? It’s important, I think, for everyone who posts last modified date because changing the date for small edits is misleading to search engines as well as readers. Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @anilky,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    At the moment, our plugin doesn’t have the option to freeze the last modified date in the sitemap and the modified_time tag. Our plugin always refers to the last time the user updated an article.

    If this isn’t ideal for you, it is still possible to change this behavior. You can make use of this filter code and change the behaviour of the modified date:

    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ){
    if ( isset( $url['mod'] ) ) {
    $url['mod'] = /* CHANGE SOMETHING HERE… */
    }
    return $url;
    }, 10, 3 );

    add_filter( 'rank_math/opengraph/facebook/article_modified_time', function($time) {
    return $time;
    });

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Option to not update modified date’ is closed to new replies.