Solution:1
You can use PublishPress Capabilities plugin to assign multiple capabilities to different Roles. You can download this plugin from here https://wordpress.org/plugins/capability-manager-enhanced/
Solution:1
You can use PublishPress Capabilities plugin to assign multiple capabilities to different Roles. You can download this plugin from here https://wordpress.org/plugins/capability-manager-enhanced/
Solution:2
With some playing around I realized I am definitely an idiot and WAY over-thought things. While I had previously read and tried some of the things in this similar post, I ended up substituting their code for mine and found it actually worked for my use case. In trying to understand why that was, I began trying to convert it to become mine and quickly found the root of my problem:
/* My Custom Post Type */
function custom_post_types(){
register_post_type( 'staff', array(
'labels' => array(
//labels redacted
),
'has_archive' => false,
'hierarchical' => true,
'menu_icon' => 'dashicons-groups',
'capability_type' => array('staff', 'staffs'),
'map_meta_cap' => true,
'public' => true,
/*---------> */ 'show_in_menu' => false, /* <---------*/
'rewrite' => array( 'slug' => 'staff', 'with_front' => false ),
'supports' => array( 'title', 'thumbnail', 'custom-fields', 'revisions'),
'show_in_rest' => true,
'taxonomies' => array( 'member-type' ),
'menu_position' => 2,
));
In an effort to have a clean custom menu, I set show_in_menu
to false which created the issues for me. When I changed it to 'show_in_menu' => true
, my issue was resolved. In addressing this, I am tempted to just try remove_menu_page();
or perhaps consider something more elegant.
Anyways, the lesson for today is not to be hyper-focused on one aspect. Hopefully this helps someone else and happy coding!