Source file: modules/sitemaps/sitemap-builder.php
View in GitHubChangelog
Since: Jetpack 4.8.0
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; }
Please, how can i exclude/remove images in my sitemap ? Am using Jetpack
You can essentially disable the image sitemap using this code here:
https://github.com/Automattic/jetpack/issues/7248#issuecomment-345997692
You’ll need to add that to your site using a plugin like this one:
https://wordpress.org/plugins/code-snippets/
Thanks!
Tell me where I should put my custom post type code and how to add my own build cpt in the sitemap.
You can use this plugin:
https://wordpress.org/plugins/code-snippets/
… to add any custom PHP to your site, including the code required here. 🙂
I want to include my owm custom post type sitemap to jetpack how i can do it please help.
This guide will show you how to include it:
https://developer.jetpack.com/2016/01/28/sitemaps-add-custom-post-type-support/
Thanks!
Thanks and tell me should i post it in function file and my custom type is portfolio so i need to replace the your custom type with this one? and Where ic an check in my sitemap that my CPT posts are now in sitemap ?
Its 24Hours i put that code in my function file but i didnt see my custom post types in sitemap why ?
Please reach out to our support folks here:
https://jetpack.com/contact-support/
… and we can help you get this sorted out. Thanks!