Closed eshimischi closed 8 years ago
@eshimischi What version of WordPress was this happening on? And does the problem still happen with this repo with all other plugins turned off and the default theme active?
@johnpbloch 4.4.1. Yes i checked the Decibel premium theme also Decibel it has some plugins that add the submenus to custom type menus, i can't see it also, but when we avoid Bedrock and use repo without it, it works.
@johnpbloch Just made a test: Install Bedrock, compose install (wordpress 4.4.1) There are no any plugins, Twenty Fifteen theme activated Add a code to functions.php
$args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => false, 'rewrite' => array( 'slug' => 'release' ), 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => false, 'menu_position' => 5, 'taxonomies' => array(), 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ), 'exclude_from_search' => false, 'menu_icon' => 'dashicons-media-audio' ); register_post_type( 'release', $args );
add_action('admin_menu', 'wpdocs_register_my_custom_submenu_page');
function wpdocs_register_my_custom_submenu_page() {add_submenu_page( 'edit.php?post_type=release', 'Settings', 'Settings', 'edit_plugins', 'label-settings', 'options_form' );}
And the result is the same!
@eshimischi This is just a hunch, but can you try changing the required capability from edit_plugins
to manage_options
? I'm not positive Bedrock does this by default, but I know a lot of people that use composer to manage their sites completely shut off file modification, which automatically removes the edit_plugins
capability from all users.
If that doesn't work, I'll try to reproduce the issue and see if I can figure it out.
@johnpbloch you just decided my problem, yes indeed manage_options
works and now i can see the Settings submenu. Didn't see any tips about changing edit_plugins
before so thanks again for your time!
PS: i just found it! Support
I'm glad it was something simple (although terribly obscure), and not an actual bug in the WP or Bedrock codebase. Thanks for getting in touch with your question!
Hello. Very strange to say but i made my custom post type Release for Discography and tried to sort out things with add_submenu_page to add an Option submenu with no luck.
It works fine with official Wordpress. Tried to reinstall Bedrock and composer->johnpbloch/wordpress with no luck again.
Any ideas?