CPT Sitemap only shows archive and not posts

#296497
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    The posts for that specific CPT are already marked as indexed and they have canonical tags in them as well but still, they don’t appear in your sitemap even after flushing the sitemap cache.

    Can you please 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/

    After that, please check the sitemap page again and see if this fixes the issue.

    Let us know how that goes. Looking forward to helping you.

    Joey
    Rank Math free

    Both sitemaps that are not working were already listed in the “Do not cache” section of WP Rocket before I created this ticket.

    Hello,

    Thank you for your patience.

    I’ve checked your sitemap, and it seems that it is still getting cached from your server-level caching either from WP-Engine or Cloudflare.

    Caching

    You can get in touch with your web host to exclude your sitemap from getting cached.

    I hope that helps.

    Thank you.

    Joey
    Rank Math free

    They’re definitely not cached by Cloudflare as seen by the cache status in the header: cf-cache-status: DYNAMIC.

    I also just implimented the RankMath post_type_archive_link filter and saw the archive URL update from /blog/learn to /learn as well as /blog/guides to /guides.

    So the sitemapes have changed and I can see those changes, but the sitemap still doesn’t display the posts – just the archive URL.

    Lastly, I purged the WP Engine cache and the posts are still not listed – just the archive.

    Hello,

    I was able to check the issue is being caused by the filter that you are using to change the URL of your post type. If you comment out that filter and check the sitemap, the URLs are being included in the sitemap.

    If you want to keep using that filter then you will have to add all the URLs manually using the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-urls-in-sitemap

    Hope this helps. Let us know if you need any other assistance.

    Thanks.

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

The ticket ‘CPT Sitemap only shows archive and not posts’ is closed to new replies.