Using the jetpack_sitemap_skip_post filter
-
I’d like to know how to use this filter in order to remove certain pages from my sitemap. I’ve tried adding this function to my theme functions:
//Remove specific pages from sitemap function remove_pages_sitemaps( $post_names ) { $post_names[] = 'contact'; return $post_names; } add_filter( 'jetpack_sitemap_skip_post', 'remove_pages_sitemaps' );
But all of my pages except for the homepage were removed from my sitemap.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Using the jetpack_sitemap_skip_post filter’ is closed to new replies.