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
- Introduced in Jetpack 4.8.0
How to use this hook
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; }