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

CPT is still listed in Search Appearance settings even when removed from "accessible post types" #16558

Open
4 of 9 tasks
florianziegler opened this issue Jan 14, 2021 · 0 comments
Labels
severity: trivial Yoast: Management Issues about options and management of the plugin

Comments

@florianziegler
Copy link

florianziegler commented Jan 14, 2021

  • 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.

I am using your wpseo_accessible_post_types filter to remove a public (as in 'public' => true) custom post type from being handled (for lack of a better word) by your plugin.

It works fine in removing – for example – the xml sitemap for that post type, the custom columns in the overview and the meta box.

But, the cpt is still listed under "Search Appearance > Content Types".

Please describe what you expected to happen and why.

I expected the excluded post type not to be visible here, as the settings do not matter anyway, because the post type is excluded by the filter mentioned above.

Looking at the code, you seem to be displaying the settings for all "public" post types, where as you should be displaying them for only the "accessible" (as you call them) post types.

How can we reproduce this behavior?

  1. Exclude a public cpt using the wpseo_accessible_post_types filter
  2. In WordPress Admin go to "SEO > Search Appearance > Content Types"
  3. Scroll down to see the cpt still listed

Technical info

  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other

Used versions

  • WordPress version: 5.6
  • Yoast SEO version: 15.6.2
@florianziegler florianziegler changed the title CTP is still listed in Search Appearance settings even when removed from "accessible post types" CPT is still listed in Search Appearance settings even when removed from "accessible post types" Jan 14, 2021
@Djennez Djennez added severity: trivial Yoast: Management Issues about options and management of the plugin labels Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: trivial Yoast: Management Issues about options and management of the plugin
Projects
None yet
Development

No branches or pull requests

2 participants