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

category or tag is changed to noindex if the last post in category is noindex #1052

Closed
michaeltorbert opened this issue Aug 6, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@michaeltorbert
Copy link
Member

commented Aug 6, 2017

I tested my site with All in One Seo and plugin and I discovered that if the last post in category or the last post with specific tag has a “no index” atribute that all category or tag has “no index”. If you publish new post without “no index” all category will by without “no index” again. I think it’s a bug.

Reported here:

https://wordpress.org/support/topic/plugin-generate-noindex-for-new-tags-and-category/#post-9385543

We need to verify the issue, then see when it started.

@arnaudbroes

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2017

Confirmed. Once a post belonging to a certain a category is marked as "no index", the category page for that specific category will also output "no index" in the source code.

Traced this back to 2.2 so it's been there for a while.

@wpsmort

This comment has been minimized.

Copy link
Member

commented Aug 7, 2017

@michaeltorbert This bug also includes the NOFOLLOW and Disable on this post settings. In other words, if you select either of three checkboxes (NOINDEX, NOFOLLOW or Disable) on the last post in a category or tag then that setting will get applied to the category or tag archive.

@michaeltorbert michaeltorbert removed this from the 2.3.16 milestone Aug 8, 2017

@michaeltorbert

This comment has been minimized.

Copy link
Member Author

commented Aug 8, 2017

This is also the case for tags and custom taxonomies. When testing, we need to make sure we don't break it for Pro, which handles things a bit differently.
Basically, we were using the data from the latest post (since the global $post object is the latest post on a category archive page). This possibly affected other things too, and possibly changes expected behavior with this commit.

@wpsmort

This comment has been minimized.

Copy link
Member

commented Aug 8, 2017

@michaeltorbert I tested this going from live free to this branch and confirmed that the Noindex, Nofollow, Custom Canonical URL and Disable on this page/post all change to the correct settings. I then copied the changes to the dev version of Pro and switched between current free, dev free, current Pro and dev Pro. I confirmed that the changes in the source code were all correct.

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