Must be a problem with the surrounding code, your add_menu_page
code works fine inside my test code, i can see the item as an admin or editor.
add_action( 'admin_menu' , 'admin_menu_new_items' );
function admin_menu_new_items() {
add_menu_page('Calendar', 'Calendar', 'edit_posts', 'wp-eventcal/eventcal-manager.php');
}
Works just fine for me..
Are you using any plugins for managing the admin menu, such as Adminize? Or alternatively using any CSS to hide elements in the menu? Only two reasons i could think it would be hidden(aside from a problem with surrounding code).
Related Posts:
- What action should I hook into when adding roles and capabilities?
- What is valid timing of using current_user_can() and related functions?
- Allow Contributor to change the author of his own post?
- What’s the difference between Role and Meta capabilities; When to use map_meta_cap() filter
- How can I grant capabilities directly to users (not roles) in wp-admin?
- Disable posts, only allow to edit existing pages, not create new ones (create_posts)
- How to get all capabilities of an existing user role
- What exactly is WordPress?
- Menu capability in WordPress
- Does the “promote_users” capability allow someone to create a new admin account?
- current_user_can( ‘edit_post’, $post_id ) does not work for contributer but for administrator
- Add user capability and check against it
- Listing all capabilities in dropdown is returning boolean
- Add Media Upload Capabilities Needed for Custom Role for non-Posts
- Admin custom option screen not saved unless user manage_options capability
- add_cap only adding the first two in array
- How do I code access to the built-in UI of a CPT when it’s placed as submenu of another CPT that is protected by role?
- How can I prevent a writer from being able to edit an article that has been scheduled?
- Check whether user can delete a given post
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- How to change menu page capability
- Multiple Authors on Single Post
- Allow unfiltered HTML in titles for low level users?
- Allow users to set a post author
- Unify the roles and caps?
- current_user_can capabilities in the admin not working as expected
- Remove menu items from admin page and limit capabilities
- Filter list of rules based on a capability
- Using author_can() on custom post types in WordPress
- How to show a admin bar menu item only to users with certain capabilities?
- Restricted user capabilities cannot add image
- User capability per post
- How come I see a manage_categories capability but not a manage_tags capability for any users?
- Theme option editing capability problems
- Allow Contributor to edit published post and filter by page id
- Custom post types as sub menu pages and role capabilities issue
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- Role capability issue
- Usage of current_user_can()
- Is it wise not to use only meta capabilities for certain basic post types?
- WordPress Remove Submenus
- Remove capability from specific user
- What capabilities are assigned to unauthenticated users?
- Capabilities Not Changing
- Assign multiple roles , overlapping capabilities
- Administrator role capabilities
- Conflict between Capabilities and Menu Visibility with Custom Post Types
- How to get all capabilities
- Prevent all users from editing posts except admins using hooks
- WordPress remove capability post ,media completely for custom role
- Add capability to “Editor” role to be able to view all users attachments
- Why cannot author edit pages?
- Add capability to a role , so user is only able to view his own posts
- Plugin page and capabilities
- how to change capability required to view an admin page? [duplicate]
- Give admin_menu permission to specific users
- User role and capablities only for 1 plugin
- How can restrict certain users from delete a category but can view only in wordpress?
- Delete admin edit/delete links in users list wordpress admin
- Create a Capability category to group a few custom Capabilities
- Capability to edit post slugs
- Remove capability to interact with a page
- admin can not change author profile picture
- Changing capability type without altering plugin
- add_role menu pages are not visible
- Can’t create new Pods pages
- Is there a way of retrieving the core WP capabilities?
- Pricing Tables admin page capability
- Grant access to admin menu?
- Best Roles and Capability on a site with review features using a front end custom post
- Manage Roles and Capabilities on Multi-site
- Allow roles below admin to add subscribers only
- Plugin to remove Admin menu items based on user role?
- Disallowing Users of a Custom Role from Deleting or Adding Administrators?
- Add Custom User Capabilities Before or After the Custom User Role has Been Added?
- WordPress Capabilities: edit_user vs edit_users
- Do custom user roles have any default capabilities?
- Admin page menu keeps bugging out
- reorder plugin menu position
- Remove wordpress author’s capability to moderate comments on their own posts
- How to send little data between admin pages of my plugin?
- Removing posts and comments from WordPress
- Adding Media Upload to Custom Options Panel breaks “Insert into Post”
- WordPress bug with capabilities?
- Define new user capability for custom post types?
- Adding a submenu to the Tools menu returns tools.php in a popup box
- Allow add new post access to custom post but not wp post for some role
- Remove or move admin submenus under a new menu
- Why am I timing out when using the Menu Editor?
- How to remove and disable access to General Settings Page including its link
- Custom capability for a single user
- How to put custom admin setting field into a shortcode
- How can I add/update post meta in a admin menu page?
- How to sort by two meta keys in admin area?
- Create role that can edit some user details, but not the role
- Roles see different top menu (nav menu)
- What is more secure checking capabilities of user or checking role of user in WordPress plugin development
- Users can only save their draft once before saving for revision
- register_taxonomy – show in admin menu, but not on post type (edit) screen
- Restrict editing of a custom post type based on status and user capabilities