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?
- Editor can create any new user except administrator
- Display only page specific sub menu items using Custom Walker
- non-clickable placeholder in the menu
- Ways to give a wp_list_pages menu link specific class names?
- I want remove last after wp_nav_menu
- Organizing by super-categories (or nested categories)?
- Adding first and last class to Menu on top level only
- wp_list_pages – show pages immediately 1 level below current level
- How to get all users with Author role capabilities?
- Add within the output of
- How do I get my wp_nav_menu single category page to highlight the parent?
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- How to check if a role has a specific capability
- How to add custom menu item on plugin activation?
- Outside the loop, how can I echo the current page’s menu title?
- Are User Levels Still Currently Used?
- Use menu class in walker function
- Menu link to all posts (all categories included)
- How do you return a menu with the menu name?
- You do not have permission to create Navigation Menus – Twenty Twenty-Two theme
- Walker class conditional based on parent menu item label or custom css class
- Creating a navigation menu to see where you are on your website
- Custom format nav menu only using div and a
- upload_files cap to not loggen in users – add_cap to not logged in users
- ‘wp_get_nav_menu_items’, when fired inside of the ‘wp_update_nav_menu’ hook, returns old menu items, instead of new
- using OOP approach to create plugin but stuck at making hyperlinks to work
- creating a custom walker class
- Add Buddypress profile and messages link to WordPress menu [closed]
- Is it possible to add a dynamic link in the main navigation in a child theme
- How to change menu structure?
- Edit the (automatic) HTML layout of nav menus
- How to make wordpress nav menu use post custom meta data
- Is it possible to make the heading on a page different text to the text of the menu item?
- How to Structure Pages and Subpages
- Add custom path to url to specific pages
- CTA button that is only visible to some of my users
- How do add a menu with levels within page [closed]
- Hide menu item when users are logged in/out
- add another html tag after li element in wp_nav_menu
- How do I change/remove styling (top border) on main menu for active page and hovering (Avada Theme)
- How to add scroll IDs to WordPress menu anchors
- Display pictures instead of text in menus
- how to check if given page is active page
- how to set the link in wordpress such that on clicking it doesn’t open another page but go to the bottom of same page
- custom walker class for own menu?
- WordPress Menu – creating a fake link [closed]
- Add a menu metabox to post edit page
- Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection
- (Mobile) Hamburger menu disappeared from a page (only one)
- Add div content to my already existing menu
- Hiding menu on specific pages
- sidebar navigation problem with child pages not all display.?
- How to point menu to my homepage
- save_post() on Menu Save
- dot.com/car1 does work, but dot.com/transport/car1 doesn’t work
- code to add an extra selection to the menu editor
- update_post_meta breaking wp_update_nav_menu_item
- Building a menu from a large number of pages?
- Accidental reverse order of menu items in one menu
- Editor Widget Role
- How do I remove a menu from a theme?
- Walker for menus
- Custom Menu based off custom header
- Remove “Next Post” in nav_menu
- Adding an additional menu in WordPress
- Making current_page_item work with wp_list_pages in sidebar on post pages
- Menu not Showing on Mobile or While the page is shrinked
- My Menu Disappears on my Custom Link Homepage on Mobile
- Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function
- how to add permalink/slug to wordpress custom link menu item
- Using walker to display all menu branches at once?
- How to add a class directly on a unordered list element that is a primary navigation