-
-
Save Roy-Oto/f330d2b303c1a0e2a96c364ae7b7e47f to your computer and use it in GitHub Desktop.
How to exclude pages from wp-sitemap.xml
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
add_filter( | |
'wp_sitemaps_post_types', | |
function( $post_types ) { | |
unset( $post_types['page'] ); | |
return $post_types; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment