Post type won’t populate site map.

#823865
  • Resolved William Alexander
    Rank Math free

    I’m helping a client with their sitemaps. They have several custom post types. Some of them were not appearing in the site map. I followed your guidance on clearing caches and some of them now appear, but the ebooks post type is showing as if there are no posts. There are actually 156 published ebooks posts. What can I do to try to force these posts to be represented in the sitemaps?
    https://fee.org/sitemap_index.xml

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

    I’m sorry to hear about the issue you are facing with the ebooks post type not populating in the sitemap. If you have already cleared the cache and the posts are still not showing up, there are a few more steps you can take to try to force these posts to be included in the sitemap:

    1. Check Sitemap Settings: Ensure that the ebooks post type is not excluded from the sitemap settings in Rank Math. You can navigate to Rank Math SEO → Sitemap Settings and verify that the ebooks post type is not excluded.

    2. Include Empty Terms: If the ebooks post type is associated with any empty terms or categories, make sure to enable the Include Empty Terms option in the category/tag/custom taxonomy archive settings. This will ensure that even empty terms are included in the sitemap.

    3. Check Custom Canonicals: Verify that there are no custom canonical URLs set for the ebooks posts. Custom canonicals can prevent posts from appearing in the sitemap. Remove any custom canonicals if present.

    If after checking these steps, the ebooks post type is still not showing up in the sitemap, please reply to this ticket, and a human agent from the Rank Math Support team will further assist you in resolving this issue.

    Thank you for your understanding and patience.

    Sources:
    Why Isn’t My URL Included in the Sitemap? » Rank Math
    What Are the SEO Benefits of Sitemaps? » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    I tried the steps above – no luck.

    Hello,

    Thank you for contacting us and sorry for any inconvenience that this issue might have caused.

    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/

    If the issue persists then try disabling the transient cache for the sitemap. This will make sure that your XML sitemap always reflects the latest changes on your site. To do this, you need to add a small piece of code to your site’s functions.php file or use a plugin like Code Snippets.
    The code you need to add is this:

    
    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    If you’re not sure how to add this code, you can follow this guide: https://rankmath.com/kb/wordpress-hooks-actions-filters/.

    After you add the code, please clear any cache on your site or server and check your XML sitemap again.

    If you’re still facing issues with the sitemap check if your custom post type pages are set to index in the robots meta tag and that they have self-referencing canonical URLs. Pages set to noindex and without self-referencing canonical URLs will be excluded from the sitemap generated by Rank Math.

    Let us know how this goes. Also, let us know if you have further questions or concerns.

    Thank you.

    Thank you for your help. I’ve completed all of the troubleshooting steps you requested. I had actually completed several of those already, but I checked them again just to be sure. The sitemap for ebooks is still empty, despite the fact that there are over 100 ebooks posts which are public on the site. What else can we try? Thank you.

    Hello,

    In this case, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    I’ll have to spin up a staging site and get permission from the client. I’ll do that and reply back.

    Hello,

    Sure, let us know how this goes.

    Meanwhile, if you have any other concerns, please don’t hesitate to contact us anytime to assist you further.

    Looking forward to helping you.

    Hello,

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

    Thank you.

    Ok I added the login information. Thank you.

    Hello,

    The issue here is your Canonical URLs. The current page’s complete path doesn’t match the Canonical URL exactly. Please see the screenshot below:

    Rank Math support

    Notice the missing trailing slash / in the Canonical URL. If that doesn’t match, Rank Math will not include it in the sitemap.

    To fix this, you’ll have to go to each page and remove the value in the Canonical fields under the Advanced tab of the SEO metabox:

    Rank Math support

    After that, the ebook sitemap should load again without any issues like so:

    Rank Math support

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Thank you – that solved the issue.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me 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 do 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 12 replies - 1 through 12 (of 12 total)

The ticket ‘Post type won’t populate site map.’ is closed to new replies.