OK now i understand :
There was something wrong due to previous manipulations.
add_cap
is modifying the database, so somehow i had written over other capabilities and it broke the wanted result.
So i cleaned the role with the use of a few remove_cap
, put my functions back and voilà !
Related Posts:
- how to assign more permission to wordpress author
- Allow users with Editor role to edit menus (without a plugin)
- Allow Editors to edit pending posts but not draft ones
- Allow user to “edit_others_posts” to save only, not publish
- How to Move the Author Metabox into the “Publish” metabox?
- How to enable the theme editor cap for an editor role?
- if role is logged in then do something
- Allow users to publish child pages of the pages they have access to edit
- Hide menu items for visitors and filter based on role
- Hide Menu items base on capability
- Hide menu item based on user’s custom capability
- How do I apply a class to custom menu items based on user roles
- How do you set up a WordPress blog with multiple authors to allow something like StackExchange’s “community wiki” feature?
- Restrict control in nav-menu for specific role
- Filter Menu Items by Custom User Role in a page
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- How to fix the Post Preview Button (CPT & map_meta_cap)
- if role is logged in then do something
- cannot get global $menu value in form request
- Hiding specific navigation menus from specific roles in admin panel
- Restrict user to edit only edit a certain menu
- How to give custom roles the capability to edit one Menu instead of every Menu
- WordPress theme editor not showing
- Roles see different top menu (nav menu)
- Hide menu theme location for certain capabilities?
- Problems with the navigation menu
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Getting a List of Currently Available Roles on a WordPress Site?
- Programmatically add a Navigation menu and menu items
- Any docs for wp_nav_menu’s “items_wrap” argument?
- Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?
- Editor can create any new user except administrator
- Changing the Order of Admin Menu Sections?
- How make top level menu item not have link, but have sub-menus that are linked?
- Is there way to rename user role name without plugin?
- How to create a clone role in wordpress
- Possible to hide Custom Post Type UI/Menu from specific User Roles?
- Add ‘has_children’ class to parent li when modifying Walker_Nav_Menu
- Get WP Navigation Menu from REST API V2
- How to Hard Code Custom menu items
- How to add a Custom Link to a Menu with a URL that is relative to the blog URL
- How do I remove UL on wp_nav_menu?
- Retrieving a list of menu items in an array
- WordPress default menu in database
- Adding an Arbitrary Link to the Admin Menu?
- Dynamically exclude menu items from wp_nav_menu
- Add “Logout” link to navigation menu
- How to add a Capability to a User Role?
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Select subscriber as author of post in admin panel?
- How can I get a list of users by their role?
- Split up wp_nav_menu with custom walker
- Removing container from wp_nav_menu not working
- Remove Ability for Other Users to View Administrator in User List?
- Custom Nav walker display current menu item children, or siblings on no children
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- How do I make a draft post accessible to everyone?
- Is there an easy way to replace a custom menu link with a page or post?
- Reset default roles and capabilities
- Convert output of nav_menu items into a tree-like multidimensional array
- Get page IDs from nav items
- What action should I hook into when adding roles and capabilities?
- Add a custom walker to a menu created in a widget
- Using a menu walker add a custom item at the end of the menu’s items
- add_role() run only once?
- Add settings to menu items in the Customizer
- Custom post type role permissions won’t let me read
- wp_get_nav_menu_items() not working with slug
- How to get current-menu-item title as variable?
- Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
- Add Class to Specific Link in Custom Menu
- what’s the meaning of the field wp_capabilities in table wp_usermeta
- Remove a menu item in menu
- Generate a Menu that Displays Child Pages using wp_list_pages() with the New Menu Functionality in WordPress 3.0?
- Allowing custom role access to custom post type in back end
- How do I get the name of a menu in WordPress?
- WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins
- How to Add to Each Menu Link with link text to data-attr?
- How to manually specify the current active page with wp_nav_menu()
- How to count nav menu items?
- How Does The Walker Class Work?
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Groups of capabilities: users with multiple roles?
- Filter wp_nav_menu()
- User-edit role setting distinct from wp_capabilities? [closed]
- How to modify navigation menu of the “My Account” page in WooCommerce
- remove “edit your profile” from admin menu bar
- WordPress Settings API, Implementing Tabs On Custom Menu Page
- Adding line breaks to nav menu items
- Adding category ID or slug to WP Nav Menu
- What do unfiltered_html and unfiltered_upload actually filter?
- add custom class to wp_nav_menu using filter hook nav_menu_css_class
- Custom ID for certain menu item?
- What’s the difference between Role and Meta capabilities; When to use map_meta_cap() filter
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- Check if page is in a certain menu
- Temporary capability for current_user_can()
- how to create a menu with all sub categories?
- Making breadcrumb with wp_nav_menu