Hello,
We apologize for the issue you are facing with the last modified date not updating in the Rank Math sitemap when using another plugin to update your post content.
The last modified date in the Rank Math sitemap is typically updated based on the lastmod tag, which reflects the last time the content was modified. If the other plugin is not triggering a standard WordPress save action when it updates the content, Rank Math may not recognize that a change has occurred.
To ensure that the lastmod date updates correctly, you might need to check if the other plugin provides an option to trigger a save action or hook into WordPress’s save process. If it does not, you may need to reach out to the developers of that plugin for assistance.
Alternatively, you can consider adding a custom function in your theme’s functions.php file to manually update the post’s modified date whenever the content is updated via that plugin. However, this would require some coding knowledge.
If you have further questions or need assistance with this, please reply to this ticket, and a human agent from the Rank Math Support team will be happy to help you further!
Sources:
How to Prevent Modified Date of Your Blog Posts from Being Updated » Rank Math
Hello,
Please make sure the plugin you’re using changes the modified date in the post_modified field of the wp_posts tables in your website database.
If it is making changes to the database, Rank Math also should automatically update this on your sitemap. If it is not updating, please try to follow the steps below and see if that works for you:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
3. Apply the following filter to your site to disable the transients cache for sitemap.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
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.