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

Remove canonical from noindexed set by other plugins #21983

Open
2 tasks done
alexmoss opened this issue Jan 21, 2025 · 0 comments
Open
2 tasks done

Remove canonical from noindexed set by other plugins #21983

alexmoss opened this issue Jan 21, 2025 · 0 comments

Comments

@alexmoss
Copy link

alexmoss commented Jan 21, 2025

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

If a plugin adds a noindex onto a page or post via the wp_robots filter, Yoast SEO does not remove the canonical when it should.

  1. Install and activate Yoast SEO
  2. Activate a plugin that allows for noindex to be selected (eg Elementor, Event Calendar)
  3. Select a post to be noindexed
  4. Refresh and check for the presence of a canonical tag.

Expected results

  1. Nothing should output for step 4 above.

Actual results

  1. A canonical tag is output

Screenshots, screen recording, code snippet

Joost de Valk has produced similar code elsewhere that solves the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants