Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemaps: Disable Image Sitemaps #7248

Open
seejacobscott opened this issue May 26, 2017 · 10 comments

Comments

@seejacobscott
Copy link

@seejacobscott seejacobscott commented May 26, 2017

In the sitemaps module there's currently no way to disable any specific instances of the sitemaps, specifically the image sitemap.

Checking the developer options I'm seeing filters for excluding specific images but not a way to disable the full image sitemap.

requested in 3216712-t

Is there a way to turn off the image sitemaps entirely? We don't use
attachment pages in WP, and the sitemap is loaded with attachment pages,
since we have thousands of unattached photos. Obviously we don't want that
stuff indexed. I poked around the code, but couldn't figure out an easy way
to do that.

@seejacobscott

This comment has been minimized.

Copy link
Author

@seejacobscott seejacobscott commented Aug 15, 2017

Also requested in 636092-zen

@zinigor

This comment has been minimized.

Copy link
Member

@zinigor zinigor commented Aug 15, 2017

Once we follow through with #7335 it should be easy enough to do. But for goodness sake please don't do anything before it's merged to avoid conflicts.

@jeherve

This comment has been minimized.

Copy link
Member

@jeherve jeherve commented Nov 21, 2017

For now, one can use the following filter to disable image sitemaps:

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

@chaselivingston

This comment has been minimized.

Copy link
Contributor

@chaselivingston chaselivingston commented Feb 2, 2018

Also requested in 932008-zen.

@cena

This comment has been minimized.

Copy link

@cena cena commented Feb 6, 2018

Hi @zinigor ! Any word on whether this will be merged, since #7335 has been merged?

@hakamairi

This comment has been minimized.

Copy link

@hakamairi hakamairi commented Jan 18, 2019

I need this, any plan to support this?

@jeherve

This comment has been minimized.

Copy link
Member

@jeherve jeherve commented Jan 18, 2019

@hakamairi That's not currently on our roadmap, but as you can see we've added the "Good For Community" label to this issue; if you were to contribute a patch for this feature, we'd be happy to review it and include it in Jetpack!

@1lucas

This comment has been minimized.

Copy link

@1lucas 1lucas commented Sep 14, 2019

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

where do i add the filter?

thx

@jeherve

This comment has been minimized.

Copy link
Member

@jeherve jeherve commented Sep 15, 2019

@1lucas You can follow the instructions here to add custom code to your site:
https://jetpack.com/support/adding-code-snippets/

@rams85

This comment has been minimized.

Copy link

@rams85 rams85 commented Sep 19, 2019

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

You can add this in functions.php of the active theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.