How can I add custom posts to a sitemap

#228090
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please make sure that your CPTs are set to index from WP Dashboard > Rank Math > Titles & Meta > Post Types > Your CPT and check if the Robots meta is set to Index.

    After making sure that it is set to Index, please navigate to Rank Math > Sitemap Settings > Your CPT and enable the Include in Sitemap option.

    After that, your CPTs will be included in the sitemap.

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

    Ken T
    Rank Math free

    Hey Jaideep,
    Thank you for your reply. Easy to follow and understand. Just to follow up. After setting up the sitemap, when I click on the sitemap link for one of the five custoom post types the sitemap doesn’t show—it’s because there’s no post published yet.

    Is that correct?

    Hello,

    Even if there is no post, if the sitemap is included in the main sitemap, it should show up empty with zero URLs.

    Can you please follow these steps?
    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/

    That should fix the issue. Please let me know if that does not. We are here to assist.

    Ken T
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Ken T
    Rank Math free

    in sensitive data i uploaded three screenshots showing the problem

    Hello,

    Thanks for sharing the screenshots.

    That’s how it is supposed to work. The link to the CPT sitemaps will not be included in the main sitemap while they are empty. Once you create some posts for your CPTs, the sitemaps will start to appear in the main sitemap.

    Hope this clarifies your doubts. Let us know if you need any further assistance.

    Ken T
    Rank Math free

    I got it. Thank you so much. \(*<>*)/
    I’ll mark this ticket ‘resolved’.
    Hoping that there’s a smile on your face as you have
    made me smile.Cheers Ken

    Hello,

    We are glad that this issue is already resolved.

    If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘How can I add custom posts to a sitemap’ is closed to new replies.