MainWP Community

Exclude Post IDs from the Sitemap in Yoast SEO

Exclude posts by ID from the sitemap if using Yoast SEO on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', function () {
  return array( 311, 322 );
} );
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.