In this article

filter

jetpack_sitemap_post_types

The array of post types to be included in the sitemap. Add your custom post type name to the array to have posts of that type included in the sitemap. The default array includes ‘page’ and ‘post’. The result of this filter is cached in an option, ‘jetpack_sitemap_post_types’, so this filter only has to be applied once per generation.

Changelog

How to use this hook

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

Notes

The following example adds WooCommerce products to the sitemaps.
add_filter( 'jetpack_sitemap_post_types', 'htdat_jetpack_sitemap_post_types' ); 

function htdat_jetpack_sitemap_post_types( $post_types ) {
	$post_types[] = 'product';
	return $post_types; 
}