change in_array('contributor',$user->roles)
to (in_array('contributor',$user->roles) || in_array('administrator',$user->roles))
Related Posts:
- Remove update nags for non-admins [duplicate]
- Forbid certain users to access a specific page
- Allow Editors to edit pending posts but not draft ones
- wp_insert_user role not working
- Any guides on creating custom admin pages?
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- How to target with css, admin elements according to user role level?
- Remove admin bar for subscribers
- renaming an admin menu item with decimal array index number
- Jquery no more loading, load-scripts.php not found (404)
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Editor role cannot save custom theme options
- Handling error states with admin_post
- Installing wp3.2.1 on IIS; getting empty sessions
- wordpress separate registration for different roles
- Adding Field to Profile “Name”
- Admin Menus – Name Menu different from first Submenu [duplicate]
- Add a Custom Class to Admin Menus
- When is is_admin() available?
- Creating a new page and automatically associating it with a template in WordPress
- Unable to set right time in admin and frontend template
- Display user role Name – not slug
- List User order by ID in Descending order (Backend)
- Why is this Ajax not working?
- Add user settings to specific roles
- WooCommerce – Email admin with new user details
- How to give new users two specific user role options upon WordPress user registration
- Correct folder permissions?
- Selectbox in admin panel function linking to CSS
- Sort custom meta column by other meta value
- Hiding div based on user role
- custom user role wordpress – grant guest access to edit.php without insert/update/delete
- running wp-cron.php using php not wget
- Programmatically create page when saving custom post type post
- Do not execute If User is login as Administrator or any Specific Role
- Building a WordPress App
- How can I open up my administrative panel to everyone?
- How to create pagination for users list using custom array?
- Add post with approval by the admin
- retain querystring values when savincustom options in admin
- Get categories names as an array to use it in theme settings
- Get Page ID from Backend
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Shortcode for Listing Users from Meta Value?
- Array to string conversion error in PHP 7.2 when returning user role as class
- wrap a span tag around author’s post count
- Noindex subscriber author page
- Removing custom sort order from admin page listing
- I installed WordPress locally now how do I login?
- Query for user roles
- Comment_author_url doing nothing
- How can I call a specific file (via php) by referencing the logged-in username?
- Adding a ‘style=’ bit to image_send_to_editor output
- Get options from database using php class
- Plugin: Front-end Editor – User role specific editable content?
- Limit ‘contributers’ abilities in WordPress
- Execute PHP code only with specific user role
- Edit and delete permissions pages and posts
- How to Add a cutsom slug to my custom author role
- Execute function only for specific user roles
- In PHP how do I make my navigation bar show certain links to admins only?
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Woocommerce display orders with products from specific categories to specific admins
- PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
- admin panel – How to remove “delete” button from category editing page
- how to create a user rule that can only manage support tickets?
- Hide payment method based on user role AND minimum cart value
- wordpress email checker on domain
- problem connecting to the administrator
- How to add a DELETE button to the “Edit User” WordPress admin page?
- Edit a function to take different actions based on user role
- Used a code to revoke some dashboard menus for my contributors but for some reason it’s revoked me access to the editor [closed]
- Editing the term_order field
- How to give custom roles the capability to edit one Menu instead of every Menu
- Access to “My Site” is missing from the admin bar
- Top Authors list by highest post views with Ajax pagination
- Add another role to a user when they click a button?
- Obtain wordpress user role
- How to properly create multiple conditions to redirect users roles to different pages
- Echo Option Value Based On WordPress User Role
- Role exception for a settings sub menu
- Allow BBPress participant role to trash topics
- Custom user roles doesn’t apply changes
- Dynamic form variables for post meta
- Shortcodes (with a space) added to php Sample
- How to connect database table to each registered wordpress user.
- Image not displayed
- Get author meta of all writers
- Adding Media button to only pages
- Switch-Case and user_role
- One folder to be accessible by one user
- How to lock users account until approvation
- Exclude Everywhere but Admin Area?
- How to create a User Role and give permission to only use Web Stories plugin?
- How to create custom user role without plugin?
- AJAX WP_Query’s order and orderby parameters not working
- Custom Admin Menu Report for Specific User ID
- How to add custom user role into wordpress