Open richardmtl opened 6 years ago
I think the only solution is block sitemap.xml with robots.txt.
What do you think?
@serambca I am not sure that would be a great solution, as the sitemap links would still all be there in the index. I would recommend against it.
Hi!
The problem is that with jetpack I can’t disable a index images, sub pages , and so on.
With Yoast SEO Premium I can personalize all.
I only need a news-sitemap.xml creation because Yoast SEO need another plugin for it.
Thanks and regards
Let's try to address those questions via email, it's probably a better place to discuss these issues that are not directly related to the problem highlighted in this issue.
I only suggest the posibbilty to filter the options that the people need.
I only need to enable sitemap-news.xml
Thanks
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Can this be closed with the addition of the jetpack_news_sitemap_generate
filter?
https://developer.jetpack.com/hooks/jetpack_news_sitemap_generate/
Not quite, unfortunately, as ideally we'd want the sitemap to not be generated at all.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
This request has come up a few times over the past month from WPVIP customers. Often the customer is using a sitemap solution such as MSM Sitemaps, an enterprise grade sitemap tool that has made the decision not to support news sitemaps . This leads to the customer wanting to use Jetpack's News Sitemaps alongside MSM sitemaps.
Adding a filter to allow this to happen would be ideal to the current solution of unregistering Jetpack's sitemaps based on URL. Ie:
/**
* Remove Jetpack's sitemap feature so MSM sitemaps can take control.
* Unless we are trying to access the news sitemap, in which case we use JP.
*/
add_action( 'init', function() {
if ( ! class_exists( 'Jetpack_Sitemap_Manager' ) ) {
return;
}
$raw_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
if ( false === strpos( $raw_uri, '/news-sitemap.xml' ) && false === strpos( $raw_uri, '/news-sitemap.xsl' ) ) {
vip_remove_class_filter( 'wp_loaded', 'Jetpack_Sitemap_Manager', 'callback_action_catch_sitemap_urls', 10 );
}
}, 5 ); // Priority 5 ensures this runs before JP's hook is executed on 10.
This requires filtering the entire class (ie in this example the vip_remove_class_filter
uses this gist) which is suboptimal.
Support References
This comment is automatically generated. Please do not edit it.
If this exists already, then forgive me, but I wasn't able to find it here: https://developer.jetpack.com/module/sitemaps/
Requested in 871801-zen , the ability to have ONLY the news sitemap generated by Jetpack, and not the Images sitemap. This would allow Yoast to generate the regular sitemap.