Make WordPress Core

Opened 8 years ago

Last modified 6 years ago

#37372 new defect (bug)

missing "edit permalink button" below the title

Reported by: realblueorange's profile 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)

#1 follow-up: @achbed
8 years ago

Ignore my previous response. It's close but wrong.

Version 1, edited 8 years ago by achbed (previous) (next) (diff)

#2 in reply to: ↑ 1 @realblueorange
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 to true. Setting public to false also changes this setting to false.

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.

EDIT: just noticed that you get the "edit permalinks button below the title" if you have public=true AND publicly_queryable=true.
I do not want the website to be queryable other than my permalinks. And that is quite possible. I just do not see the edit button. I can change the slug which will do the trick also, but that is not the standard way of doing it...

Last edited 8 years ago by realblueorange (previous) (diff)
Note: See TracTickets for help on using tickets.