You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Exclude a public cpt using the wpseo_accessible_post_types filter
In WordPress Admin go to "SEO > Search Appearance > Content Types"
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
The text was updated successfully, but these errors were encountered:
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
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?
wpseo_accessible_post_types
filterTechnical info
Used versions
The text was updated successfully, but these errors were encountered: