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

Consider making 'guest-authors' CPT private #105

Open
danielbachhuber opened this issue Feb 12, 2013 · 4 comments
Open

Consider making 'guest-authors' CPT private #105

danielbachhuber opened this issue Feb 12, 2013 · 4 comments

Comments

@danielbachhuber
Copy link
Contributor

It doesn't need to be public, I don't think, and causes problems when it does: https://github.com/facebook/wordpress/issues/390

@alpha1
Copy link
Contributor

alpha1 commented Dec 4, 2013

@danielbachhuber I have come back to this problem as it still bugs the hell out of me, and this seems to work as a solution.

'public' => false, //changing to false
'show_ui' => true, //adding this

Simply changing public to false, I am unable to add a new guest-author, but this removed the facebook metabox, does not post to facebook.

@danielbachhuber danielbachhuber modified the milestones: next, 3.1 Mar 14, 2014
@philipjohn philipjohn removed this from the next milestone Dec 3, 2016
@rebeccahum
Copy link
Contributor

The link from the original post doesn't work anymore. Does anyone have any context on this issue?

@TheCrowned
Copy link
Contributor

So, the CPT for Guest Authors is basically already private. The value of public has the function of indirectly setting a the following other arguments: exclude_from_search, publicly_queryable, show_in_nav_menus, show_ui. We are already giving a value explicitly to all of them, except show_ui.

Thus, currently changing the value of public only has the effect of setting show_ui. So yes, we could get rid of the public arg and set show_ui explicitly to true, but this would not affect the behavior of anything in any way :)

(register_post_type documentation)

@GaryJones
Copy link
Contributor

I agree with:

'public' => false, //changing to false
'show_ui' => true, //adding this

Right now, "Guest Authors" appears as a post type that one can configure Yoast SEO for, for instance:

Screenshot 2023-07-28 at 01 13 45

Making the change removes that, since it's only querying for public post types.

I'd suggest adding a filter to the registration args so that if someone did want to and them (like making them publicly_queryable for some reason), they can.

@GaryJones GaryJones added this to the 4.0 milestone Jul 28, 2023
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

6 participants