• Resolved ozzy1986

    (@ozzy1986)


    Hello,

    There are no posts on my site. Only products and pages.
    Is there a way to make yoast not show empty sitemaps like post-sitemap.xml (in my case) in sitemap_index.xml?

    • This topic was modified 3 years, 7 months ago by ozzy1986.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Ozzy,

    Thanks for reaching out.

    By default, if you choose in WordPress > Search Appearance > Content Types > Post to show posts in search results, a post sitemap is created. However, without posts on your site, that sitemap will be empty. However, you can choose to not show posts in sitemap so a post sitemap is not created at all. Once you have posts, you can sure change the settings.

    Thread Starter ozzy1986

    (@ozzy1986)

    Thanks.

    Yeah, that’s an option. But I thought of something automatic. Like “don’t show this sitemap if it’s empty” checkbox.
    Or maybe there’s a nice hook I can use to check if index sitemap is empty and not show it.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for sharing your thoughts, @ozzy1986. By default, Yoast SEO shouldn’t show the post sitemap if you don’t have any posts. Can you please confirm whether you used to have posts but removed all of them later?

    We look forward to hearing from you.

    Thread Starter ozzy1986

    (@ozzy1986)

    I can’t be 100% sure that there were never any post. But for previous 1 month at least there hasn’t been any post. That I can confirm. Also there is no trashed post as well.

    View post on imgur.com

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @ozzy1986

    Based on your screenshot, that looks to be the overview page for your ‘Recordings’ custom post type. Could you check the Posts overview page and see if you don’t have any published posts there?

    Thread Starter ozzy1986

    (@ozzy1986)

    Oh, no:) That’s just google translation of the page. It is initially in russian and WPML somehow can’t translate admin panel so I just used google translate.
    It is screenshot of Posts listing.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @ozzy1986

    Apologies for the confusion! Since you’ve confirmed that there’s no published posts, the post sitemap shouldn’t be generating.

    Could you go to your WP admin dashboard > SEO (sidebar) > Search Appearance > Content Types Tab > Posts > show ‘Posts’ in search results and set this to ‘No’ and then save the changes? This will set all posts to have a ‘noindex’ tag, and it will remove the post sitemap. Could you then check if the post sitemap has been removed from the sitemap index?

    You could then choose to re-enable that setting, and the post sitemap still shouldn’t generate (if you don’t have any published posts).

    Otherwise, please also do check if your sitemap is being cached – https://yoast.com/help/sitemap-does-not-update/

    Thread Starter ozzy1986

    (@ozzy1986)

    Thanks for the advice.

    This setting works fine: if disabled posts sitemap is removed, if enabled posts sitemap appears again.

    Also, while in dev I disabled my caching plugin.

    So do you suggest that there might be third-party conflict? If so can you direct me where to look? Some hook that could be added/removed by third-party scripts?

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @ozzy1986

    If you enable the ‘show posts in the search results’ setting, it’ll generate the empty post sitemap, again?

    You mentioned that you’ve also disabled your caching plugin. Were you able to check if the sitemap was cached elsewhere aside from your caching plugin – https://yoast.com/help/sitemap-does-not-update/

    Often, we see problems occur in combination with another plugin or theme. The fastest way to rule out any conflict, is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty.

    Please test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.

    If you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts

    Thread Starter ozzy1986

    (@ozzy1986)

    Thanks.

    I hope I’ll have time to check that and write back here.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    If the issue still occurs with a default WP theme and only Yoast SEO as the plugin enabled, we expect this to be a bug, or there’s something else with your setup as to why the post sitemap is still generating, even without any published posts. Please do log a bug report by following the steps here – https://yoast.com/help/how-to-write-a-good-bug-report/

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Empty submaps (index links)’ is closed to new replies.