I have a custom post type called “Icon Boxes”. “Show in Search Results” is disabled for “Icon Boxes”. Issue is: The XML URL to “Icon Boxes” shows in the “XML Sitemap” when “Show in Search Results” is disabled.
If I enable “Show in Search Results” for “Icon Boxes”, the XML URL then shows twice in the “XML Sitemap”.
Please see video which explains this exact issue on screen (turn audio on).
Thanks for reaching out regarding your XML sitemap. It’s quite strange behavior. Can you also toggle the button ON and OFF for the Icon Box Strips to see if there’s an improvement?
To rule out if it is due to a cache, can you please clear all your caching from your theme, plugin, server, CDN like CloudFlare or browser. If you are not sure how to clear caching from theme/plugin please speak to those authors. If you want to clear cache from the server, please speak to your host provider. To clear the cache from a browser use this guide: https://yoast.com/help/how-to-clear-my-browsers-cache/.
Besides, please try:
Resave permalink settings
Complete SEO Data Optimization from SEO > Tools page
Enable/Disable the sitemap from Settings.
Performed a conflict check? If not, please do so. Did you discover a conflict?
I cleared cache on browser and have no WP plugin for caching. Site is also setup locally so there is no server cache.
** please note: I have the site setup locally, on a dev server and the live site all exhibiting the same issue.
I did all of the following but the issue still exists: – resaved permalinks – completed SEO data optimisation within tools – enabled and disabled sitemaps – disabled all plugins but yoast and the post type maker
** please also note that when I enable the XML sitemap for “Icon Boxes” it appears twice in the list.
Thanks for getting back to us and also for sharing more details. Can you please check whether you have added any filters to add the sitemap manually using any filters in your theme’s functions.php file or not?
If not, it would be mostly added by some other plugins 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-Two.
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
If you feel uncomfortable doing this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.
Can you please check whether you have added any filters to add the sitemap manually using any filters in your theme’s functions.php file or not?
If not, it would be mostly added by some other plugins 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-Two.
^ we had done this previously, (I failed to mentioned we switched to default theme whilst all plugins (but yoast) were disabled).
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.
Can you share the steps to replicate this, especially re-creating the custom post type? How was the CPT created? Is it from a theme, a custom plugin or custom coded?
This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Custom Post Type – Show in Search Disabled – Shows in XML Sitemaps’ is closed to new replies.