#30616 closed defect (bug) (worksforme)
No Edit Post link in Toolbar if post type is placed as a sub menu using show_in_menu
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | ui, administration | Cc: |
Description
If we create new post type with register_post_type function using 'edit.php' as a value of show_in_menu argument (in order to place our post type as a sub menu of Posts in WP Admin area), then if we create new post and display it in the frontend there will be no Edit link in Toolbar (Admin Bar).
Steps to reproduce this bug are very simple (tested in WordPress 4.0.1):
- Copy the code below and paste it into functions.php file
function codex_custom_init() { $args = array( 'public' => true, 'label' => 'Books', 'show_in_menu' => 'edit.php' ); register_post_type( 'book', $args ); } add_action( 'init', 'codex_custom_init' );
- Create new post in our newly created Post Type.
- Click 'View Post' button.
(To see the post maybe you have to flush rewrite rules)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Hi @Dumian,
Using your code sample and flushing permalinks on 4.3, I'm sseing the 'Edit Post' link in the Toolbar as expected. Closing as worksforme. Feel free to reopen if you continue to experience this issue.