Opened 8 years ago
Last modified 6 years ago
#37372 new defect (bug)
missing "edit permalink button" below the title
Reported by: | realblueorange | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.3 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
With posts and pages there is an "edit permalink button" below the title. Also, permalinks change when the title is changed.
For custom posts that does not seem to work in the same way:
For the function register_post_type() there is a 'public' argument which is merely a way of defining 4 other arguments in 1. If you set that to false and then set 'show_ui' to true to get the user interface back you get the complete user interface except the "edit permalink button" below the title. Also, permalinks do not change when the title is changed.
That seems like a bug and not like intended functionality.
Change History (2)
#2
in reply to:
↑ 1
@
8 years ago
Replying to achbed:
The reason is that querying posts must include the post type in some fashion. A permalink simply maps to an internal post query. So in order to use the permalink system, you must have
publicly_queryable
set totrue
. Settingpublic
tofalse
also changes this setting tofalse
.
If I understand the register_post_type() function correctly the 'public' argument is a way of setting 4 other arguments at once.
The value true implies exclude_from_search: false, publicly_queryable: true, show_in_nav_menus: true, and show_ui: true.
Setting it to false implies: exclude_from_search: true, publicly_queryable: false, show_in_nav_menus: false, and show_ui: false
I need exclude_from_search: true, publicly_queryable: false, show_in_nav_menus: false, and show_ui: true.
I would expect that setting 'public' to false and 'show_ui' to true would result in the normal user interface, including the "edit permalink button" below the title. And, I do need the permalinks.
By the way: I have 'publicly_queryable' set to false, but that does not mean I cannot use them or show them. They do have permalinks that are useable.
The reason is that querying posts must include the post type in some fashion. A permalink simply maps to an internal post query. So in order to use the permalink system, you must have
publicly_queryable
set totrue
. Settingpublic
tofalse
also changes this setting tofalse
.