Register_Post_Type "public" and "publicly_queryable" arguments
-
My simple question is this:
with register_post_type(), can i have ‘public’ be false AND have ‘publicly_queryable’ be true?
The codex says this:
public
(boolean) (optional) Controls how the type is visible to authors (show_in_nav_menus, show_ui) and readers (exclude_from_search, publicly_queryable).
Default: false
‘true’ – Implies exclude_from_search, publicly_queryable, show_in_nav_menus, and show_ui. The built-in types attachment, page, and post are similar to this.
‘false’ – Implies exclude_from_search: true, publicly_queryable: false, show_in_nav_menus: false, and show_ui: false. The built-in types nav_menu_item and revision are similar to this. Best used if you’ll provide your own editing and viewing interfaces (or none at all).SO: By the codex saying “implies publicly_queryable: false” — does this mean I CANNOT set ‘publicly_queryable’ to true and have a different result? Or can I override it?
I ask because I get different results with public FALSE and when i toggle publicly_queryable to false versus true. I was told that if public is false, I can NOT have publicly_queryable set to true because the logic doesn’t make sense and the codex “clearly” shows this method is wrong.
Any ideas? takers?
- The topic ‘Register_Post_Type "public" and "publicly_queryable" arguments’ is closed to new replies.