The problem was, that I changed the capabilities AFTER I already created the role. I noticed, that if I change the roles slug, the role became duplicated. So I searched, and found
remove_role( 'tabellenadmin' );
Add that line somewhere before add_role(). You first have to remove the role, before you can change it.
Related Posts:
- Apply custom role capabilities to administrator (without plugin)
- Roles & capabilities GUI that does not create separate table
- How to add custom JavaScript in functions?
- The Capability to choose post/page template
- Remove or disable Appearance > Patterns
- Displaying the number of updates available in the Admin area
- Remove a menu item created by a plugin
- How to remove Customize from admin menu bar after WP 4.3
- Modify Admin Bar Link
- Run functions only in the admin area?
- difference between add_object_page and add_menu_page
- 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?
- Remove Menu Page Giving Error
- How do I redirect upon login a specific user based on role?
- Print Dashboard menu name and link
- How to add another user to this remove_menu function?
- Add a new subscriber role using a function
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- How to change menu page capability
- How to test for Super Admin
- Custom roles can’t access to wp-admin
- Custom registration URL lost when user makes signup mistake
- Custom function for specific user role
- Hide Author.php template from specific user role
- Logout hyperlink within a sub-menu
- edit role display name and label name without plugins
- Add Featured image column into wordpress admin on pages AND posts
- create shortcode to list users with specific meta key value
- Toggle User Roles with button
- Change position of media in admin menu
- How to change or add user role after getting post request data about pay? [closed]
- Custom post types as sub menu pages and role capabilities issue
- Execute a ultimate member action when user role is updated
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- Role capability issue
- Creating A New Admin Menu Tab For Theme Options
- Allowing users to view private posts (pending approval)
- WordPress Remove Submenus
- Allow Contributor to edit their own posts after Adm aproval
- How to set default post editor based on role?
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- load CSS only for administrators on backend
- Adding additional roles on registration
- How to add array [closed]
- Get users with different roles and call function on each of them (user_meta)
- How can I show different content for different user-levels?
- How to change a specific admin label
- Custom user role still showing up after deletion, ideas?
- Allow a user or role to view drafts and previews, but not other admin privileges?
- How to load a css file depending on the current role
- User role and capablities only for 1 plugin
- Allow user select role in wordpress default registration without plugin
- Remove check boxes and its label from screen option for custom role
- Add Change role button for list of user in an event
- How to show only specific category post by user role without plugin and restrict all other cats
- Change user role based on total number of items ordered
- How to add publish/draft button in Admin Post Lists
- Remove all video attachment, both files and post/postmeta from database?
- Which method is more correct for removing WooCommerce Extensions menu item?
- delete_user_meta for user in spesific group
- Change the second role depending on the first
- Restrict certain roles registrations by domain
- Multisite Admin Roles
- Hide certain post types from editors
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Function Reference for custom link in Admin Menu Management Page
- Grant access to admin menu?
- Welcome Mails based on user role
- Sync roles across several plugins
- How to disable plugin capability : “create new category”
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Would it be possible to disable embeds for specific user roles? If so, how?
- How to make my logged-in user-role shortcode displaying name instead of slug?
- How to resize image from import image url?
- Vimeo video play button color function
- User’s Comments Number: Storing it in a meta field for different uses
- Show one post per author and order by custom field
- Text before price on WooCom
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Change Post status based on custom field date +1 day
- How to add height and width dimensions automatically to archive descriptions
- edit slider plugin capability for custom_role
- Make plugin admin page visible to other roles
- How to overwrite image if it already exists – WordPress, Gravity form
- Change TinyMCE undeline outpout
- Loading newest dependency javascript module file in functions.php
- How to store page-{id}.php templates in custom folder
- Custom Admin Menu Report for Specific User ID
- Setcookie not setting cookies anywhere except admin
- WooCommerce, change “Add to Cart” to “Link to Product”, only for specific categories
- Advanced Custom Fields in WP_Query: Clickable Text in List Format
- How Do I Prevent Featured Image Caption Displaying Above And Below Image
- How to cache results of of get_available_post_statuses() function as it is causing a slow query on a website with over 1 million posts?
- post_content return zero!
- Add custom css to specific user
- Send An Email to Admin on User Profile Completion
- Hide ID for WordPress User Role Subscriber
- How to sort a non-meta field in the User Admin Panel?
- Remove Actions/Filters added via Anonymous Functions
- set a Gravity Forms uploaded image as a user’s avatar