Custom Post Type Admin Sub Menus missing for Non Admin
I can see the sub menu (drop down) of posts and pages and other dashboard admin menu sections on the left. However when u log in as a contributor, you can see the title of the Custom Post type on the left menu, if u click the menu title you get the list of custom posts made, but the default sub menu drop down that goes along, such as add new etc is missing, I can see the sub menu as admin. I can also see sub menus for non admins for other sections, like media..etc…any ideas?
Do you have the public key set to true in your register_post_type() function? Also, are you defining show_in_menu in the args array? Check out the full list of parameters on this page: http://codex.wordpress.org/Function_Reference/register_post_type.
Ok so I added
and Contributor still cannot see the sub menu, only the top level label of the custom post. here is my code for registering the post type. I have deactivated and reactivated the plugin I created to create the post type aswell.
register_post_type('user-song', array( 'labels' => array( 'name' => 'My Songs', 'singular_name' => 'My Song', 'add_new' => 'Add New Song', 'add_new_item' => 'Add New Song', 'edit' => 'Edit', 'edit_item' => 'Edit Song', 'new_item' => 'New Song', 'view' => 'View', 'view_item' => 'View Song', 'search_items' => 'Search Songs', 'not_found' => 'No Songs found', 'not_found_in_trash' => 'No Songs found in Trash', 'parent' => 'Parent Song' ), 'public' => true, 'has_archive' => true, 'show_ui' => true, 'supports' => array('thumbnail','title', 'editor','comments'), 'show_in_nav_menus' => true, 'show_in_nav_menus' => true, 'show_in_menu' => true, 'taxonomies' => array( '' ) ) );
just to be clear. my issue is i can see the drop down menu for custom post types on the left sidebar in the dashboard as the admin. but not once logged in as contributor. I only see the top level label “My Songs” and not add new etc..below it…thanks again for any help.
Ok so I made the users Authors instead of contributors and the can now see the sub menus.
Yes, user roles play an important part in what options are available in the admin section.
I’m sorry, i completely overlooked the part about being logged in as the contributor role. When you were logged in as a contributor, could you still see those sub menu options on Posts and Pages? From what I read of your first post, it sounds like you were able to see them while logged in as the admin but not when you are logged in as a contributor. Is this correct?
Here is a more info on user roles: http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
that is correct, it then changed the contributor to authors, and changed the default sign up role to author.As authors they see the sub menus, not as contributors. My new issue is only showing authors their posts instead of all posts of that custom type. Any ideas?
I would recommend a plugin for that type of customization unless you are familiar with writing your own user role capabilities.
Here is a link to a good plugin for what you want to do: http://wordpress.org/extend/plugins/user-role-editor/
- The topic ‘Custom Post Type Admin Sub Menus missing for Non Admin’ is closed to new replies.