filter

jetpack_sitemap_skip_post

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

How to use this hook

See “How to use actions and filters to customize Jetpack”.

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 );