Suggestion: Sitemap to exclude custom post types with ‘exclude_from_search’.
-
I recently ran into an issue where information in the form of a custom post type that should have only been accessible with a direct link was broadcast across google search results.
I had assumed with the custom post type setting ‘exclude_from_search’ set to true that Yoast SEO would respect that, apparently not. These posts were still appearing in the sitemap.
I have since added meta noindex tags to the pages displayed on them and added filters to the ‘wpseo_sitemap_exclude_post_type’ and ‘wpseo_sitemap_exclude_taxonomy’ to exclude the post type and related taxonomies from the index. So the issue is resolved for now but I do think Yoast SEO should check a posts ‘exclude_from_search’ before it starts including posts in the XML.
- The topic ‘Suggestion: Sitemap to exclude custom post types with ‘exclude_from_search’.’ is closed to new replies.