The post details under sitemap is not updated

#897519
  • Resolved 小編
    Rank Math free

    Dear team,

    We have two problems with our sitemap under sensitive data.

    1) We have have more than 75 posts so far but the site map is only reflecting 55 URL under post, and;
    2) While we updating the post everyday but we saw the last modified date under post on the site map is 2 Oct 2024.

    We have checked and confirmed that:

    – All posts didn’t set as “no index”;
    – We are using cache plugin but we believe that we have exclude the sitemap from caching.

    Please help, thank you.

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

    We apologize for the issues you are facing with your sitemap. Thank you for raising these concerns.

    1. Sitemap Not Reflecting All Posts: If your sitemap is not showing all posts, it could be due to custom canonicals. Rank Math includes a self-referencing canonical for all posts set to Index. If any of your posts have a custom canonical, they will not appear in the sitemap. To ensure all posts are included, please remove any custom canonicals from your posts and allow Rank Math to generate the canonical.

    2. Last Modified Date Not Updating: The last modified date in your sitemap is determined by the ` tag. If this date is not updating, it may be related to caching issues. Even if you believe you've excluded the sitemap from caching, it's worth double-checking your cache plugin settings to ensure that the sitemap is indeed excluded from caching. Additionally, you can try adding the following filter to your theme’srank-math.php` file to disable caching for the sitemap:

      add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    For further assistance, please reply to this ticket, and a human agent from the Rank Math Support team will take over and provide more detailed help.

    Thank you for your patience!

    Hello,

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

    Please follow the steps below:

    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 code to your site.

    
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    Here’s how you can add filter to your WordPress site:https://rankmath.com/kb/wordpress-hooks-actions-filters/

    If the issue persists, please share the affected post URLs that are missing in your sitemap so we can check them closely.

    Looking forward to helping you.

    小編
    Rank Math free

    Thank you,

    The sitemap correctly reflects the number of post after step 1.

    We have implemented step 2.

    As for step 3, do you have any guideline for plugin WPCode Lite?

    Hello,

    You should add the code as PHP Snippet to your WPCode plugin like in this image

    wpcode

    Then choose Auto Insert and Run everywhere at the bottom.

    Looking forward to helping you.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this ticket.