Created
July 17, 2018 19:35
-
-
Save mariusghitulescu/ee1f365c48fc9866439d4400d639e2f7 to your computer and use it in GitHub Desktop.
Exclude post type from sitemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Exclude One Content Type From Yoast SEO Sitemap */ | |
function sitemap_exclude_post_type( $value, $post_type ) { | |
if ( $post_type == 'post_type_slug' ) return true; | |
} | |
add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment