Filter condition to allow skipping specific posts in sitemap.
Parameters
- $skip
bool
Current boolean. False by default, so no post is skipped.
- $post
object
Current post in the form of a $wpdb result object. Not WP_Post.
Changelog
- Introduced in Jetpack 3.9.0
How to use this hook
Notes
You can use this filter to remove specific posts from your sitemap, like so:function jetpackcom_sitemap_exclude_post( $skip, $post ) { if ( 2146 == intval( $post->ID ) ) { $skip = true; } return $skip; } add_filter( 'jetpack_sitemap_skip_post', 'jetpackcom_sitemap_exclude_post', 10, 2 );