Exclude post type from sitemap WITHOUT adding noindex?
-
I have a custom post type (
shorthand_story) that’s crashing my sitemap generation due to memory exhaustion. The posts contain large embedded content (218 posts totaling ~1GB of post_content data). When Yoast tries to build the sitemap, it exceeds PHP’s 256MB memory limit.I want to exclude this post type from the XML sitemap while still allowing the posts to be indexed (they’re discoverable via internal links).
When I disable “Show in search results” in Yoast settings for this post type, it also adds
<meta name="robots" content="noindex, follow">to the posts themselves, which I don’t want.Is there a way to:
- Exclude a post type from sitemap generation only, OR
- Prevent Yoast from loading full post_content when building sitemaps?
Thanks for any guidance.
You must be logged in to reply to this topic.