Taxonomy Sitemap Last modified Date

#820589
  • Resolved Mc
    Rank Math free

    My coupon site’s main pages are taxonomies (stores). The Rankmath-generated sitemaps for these store pages will only update the “Last Modified” date if I edit a coupon from within that store. This creates a problem I need help solving.

    GOAL: How can I get Rankmath to update the sitemap’s Last modified date when any changes are made to the surrounding content shell of the store taxonomy page also? For example – if I edit meta, article text, videos, FAQ, etc.? Clearly, the page has been updated and sometimes expanded greatly. But the sitemap will have a Last modified date that is wildly out of sync. unless I edit a coupon. 🤦

    If I make a sitewide change to the store page content, currently I am manually editing 1 coupon from all 550 stores to update the Last Modified date of all 550 stores. That doesn’t make sense, there has to be an easier way.

    Thank you in advance for your awesome support

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

    Thank you for reaching out with your concern about the Last Modified date on your taxonomy sitemap pages in Rank Math. I understand the issue you are facing where only editing a coupon within a store updates the Last Modified date, causing synchronization problems when other content on the store page is updated.

    To ensure that the Last Modified date on your taxonomy sitemap pages updates when changes are made to the surrounding content shell of the store taxonomy page, you can follow these steps:

    1. Use the Rank Math Filter: Rank Math provides filters that allow you to customize its behavior. You can utilize the filter provided in the Rank Math knowledge base to update the Last Modified date on your sitemap index. Here is an example of the filter you can use:
    /**
     * 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 );
    1. Implement the Filter: You can add this filter to your theme’s functions.php file or use a custom plugin like Code Snippets to add and manage custom code snippets easily.

    By implementing this filter, you can remove the dependency on editing coupons to update the Last Modified date for all your store pages when changes are made to the surrounding content shell.

    If you encounter any issues or need further assistance with implementing this solution, please feel free to reach out. We are here to help!

    Thank you for your patience and understanding.

    Sources:
    How to Change the Date & Time on Your Posts/Pages » Rank Math
    How to Prevent Modified Date of Your Blog Posts from Being Updated » Rank Math
    How to Remove Date Snippets from Search Results » Rank Math
    How to Create a Custom Sitemap and Include It in Rank Math » Rank Math

    Mc
    Rank Math free

    I do not want to remove the Last Modified Date from the Sitemap.

    Hello,

    Thank you for contacting support.

    The taxonomies on WordPress don’t save the modified date anywhere in the database so it’s impossible for us to retrieve the correct date that they were updated.

    Because of that, we take the date from the latest entry inside that taxonomy to get the modified date of the taxonomy.

    This is a limitation on how WordPress handles taxonomies that we cannot get around.

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

The ticket ‘Taxonomy Sitemap Last modified Date’ is closed to new replies.