Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [user-roles]

Names for a set of user capabilities.

0
votes
1answer
14 views

Set “editor” role to existing user

Using the User ID of an existing user, how do I change the role to Editor? Here's what I tried: $wpdb->query("UPDATE wp_usermeta SET meta_value = 'a:1:{s:6:\"editor\";b:1;}' WHERE user_id = '$...
0
votes
0answers
7 views

How to create a manage user page for a specific role in wordpress admin area?

I need all controls like Add/Edit/Delete and pagination as well. $user_query = new WP_User_Query( array( 'role' => 'Owner' ) );
0
votes
0answers
15 views

How to hide 'Submit for Review' button for a specific role in Wordpress?

Currently, I've got 2 roles which are Contributor and Editor, both of these roles are able to submit for review, but I only want Editor has this button and hide it for Contributor.
0
votes
1answer
39 views

How to create a specific role to manage users

I have created a non-admin user role to manage users. I have given this role the following capabilities: Create User, Delete User, Edit User, List Users, list roles. A member with this role CAN create ...
1
vote
1answer
17 views

New user is assigned 2 roles: customer and superadmin

I've a question about user role in WordPress. After new user already registered. They can access with superadmin and customer role. They can access to /wp-admin/, create blog, etc.. For my ...
0
votes
2answers
19 views

Publishing post strips custom html element when user is not admin

This phenomenon occurred after updating Wordpress from 4.9.10 to 5.1.1. I'm using the plugins TinyMCE Advanced, Classic Editor and Advanced Custom Fields PRO. The wordpress installation has the roles ...
1
vote
1answer
17 views

Is there a way to identify a user in a custom REST API method?

In a custom REST API method, I would like to identify the user (typically get_current_user_id() then retrieve their data from database (things like they're role and some custom permission). But so ...
0
votes
1answer
13 views

Adding additional roles on registration

I'm trying to add an additional role for a user when they register if they register as a specific role. Here is my function: function add_secondary_role( $user_id ) { $current_user = ...
0
votes
1answer
13 views

Wordpress add_rewrite_rule redirection match GET variable not passing through to custom template

My target: Create a page template in theme (page-expert.php) following the guide Page Templates. Create a blank page with the template. The above page will show the profile information for certain ...
-1
votes
0answers
32 views

Unable to connect user without appending parameters to URL

I'm facing a strange behaviour of wordpress, after login as "customer" i have to append manually any parameter to url to make me logged in, but when i am login with another role as administrator, i ...
1
vote
0answers
37 views

WooCommerce Customer Role Delete Custom Post Type

WooCommerce customers are creating custom posts using Gravity Forms and then the customer is assigned as the author of the post. The custom post type is set up using the CPT UI plugin. I have this bit ...
0
votes
1answer
14 views

After setting up a new Role, CPT and capabilities, the new role can't see the featured image

Registering the custom post type: $labels = array( 'name' => 'tananyags', 'singular_name' => 'etananyag', 'menu_name' => 'E-Tananyagok', 'name_admin_bar' => 'Add new', 'add_new' ...
0
votes
0answers
22 views

Role and Capabilities: How do I allow user role to access theme options without enabling 'manage_options'?

I'd like to allow a certain user role to access the theme options only. When I tried this in functions.php, nothing happened: $limitedadmin = get_role('limitedadmin'); $limitedadmin->add_cap('...
0
votes
1answer
29 views

Email notification for editors only

I would like to send an email to all editors of my blog when a new article has been published. I found many plugins but I want to solve this problem without plugins. In addition, I found a tutorial to ...
0
votes
0answers
14 views

Allow Block Editing By User Role

I am looking to see what options there are for Gutenberg (or via a plug-in) to allow users with certain roles to edit blocks on pages. Here is a general layout. Multiple pages are in the site, and ...
0
votes
1answer
24 views

Prevent Subscriber Role to login

How can I prevent a Subscriber to login? I want to prevent the user role.
0
votes
0answers
39 views

fine-grained capabilities for user related capabilities

When we want to adjust users capabilities, we can do so quite fine-grained. For example we can configure that a certain user can edit posts. But furthermore we can limit the capability of editing ...
0
votes
0answers
29 views

underscore not allowed in role slug?

I created a role, 'CFI_G' in a plugin activator: if(!role_exists('cfi_g')){ add_role('cfi_g' , 'CFI-G', array('edit_gc_instruction')); } else { (note the underscore in the slug) It appeared to ...
1
vote
1answer
27 views

Allowing Custom Capability to Manage Plugin Options

Question Is it possible to give a custom capability the ability to manage the options of specific plugins? Background I am developing a suite of plugins, a main one with some additional modules. ...
-1
votes
1answer
32 views

How to disable the “Upgrade or Downgrade” button in “My account” of WooCommerce Subscriptions

I have a Wordpress/WooCommerce webshop and I use WooCommerce Subscriptions. I want to disable the "Upgrade or Downgrade" button in My account > My Subsccriptions for users which have a specific user ...
0
votes
0answers
30 views

Plugin admin menu

I have a question currently I am using a table generator plugin, I want to allow users with the editor role to view this plugin menu on wp-admin. I understand manage_options capability ONLY Allows ...
0
votes
0answers
27 views

Add Media button of WP_Editor on custom role profile page not working

I have a custom role defined which has a separate profile page in the front-end. In the profile page there is a wp_editor with Add Media button. But the image is not being attached. This is the error ...
0
votes
0answers
16 views

Multiple useres editing specified content

I work for a nonprofit with weekly courses for kids. Every week the course teachers update where and when next weeks course will be. We have about 10 courses every week. So the teachers need to be ...
0
votes
0answers
59 views

wp_get_current_user Not working

I am using the wp_get_current_user() function inside a hook which fires before email is sent from contactform7 . The function works but the main problem is that the function doesnt return the current ...
0
votes
0answers
17 views

Create custom role and capabilities to manage CPT

I have created a job offers plugin with two custom post types job_offer and job_application. Now I'm trying to create a custom user role "HR Manager" with custom capabilities. This user role should ...
0
votes
0answers
19 views

Create a custom User Role within a Child Theme

I want to make a very custom user role; i.e. a 'sub admin' if you will. Some things I'd like to do would be to disable the 'html abilities' from within the 'edit page or edit post' mode for this user (...
0
votes
0answers
26 views

woocommerce_order_status_completed hook does not run

I need to add a new role to my recently registered user (upon buying any of my four specific subscriptions products). Until now, every recently registered user (those who buy a subscription product) ...
0
votes
1answer
19 views

Custom user role not working as expected

I've defined a custom user role in functions.php called "Dashboard Admin" with the capabilities defined below. The site has a number of custom post types- all with capability post- and I'd basically ...
0
votes
1answer
19 views

Updater user with multiple roles

I have searched the net for explanations, but I only find my own question without any real answer. Like this one: Adding multiple user roles dynamically I need to dynamically assign more than one ...
0
votes
0answers
22 views

Restrict certain pages to the users with the same user role

So yes I know there are plugins such as Capability Manager Enhancer & Edit User Role which allows users with the different user roles to edit certain pages. However, I don't think they support ...
0
votes
1answer
21 views

access the plugins for each role in WordPress multisite

I have created a multi site website.   Several roles using the aam plugin have been created on the website: Special professional And... I want users who have registered on the site to create a site, ...
0
votes
1answer
45 views

Custom Gutenberg Block and unfiltered_html capability

This is more a "am I understanding this right" kind of question: When I create a custum Gutenberg Block that should be used by an user of role Editor(which has no unfiltered_html capability on a ...
0
votes
1answer
44 views

Is there any way to make myself an admin?

Long story short, my client has a website with another company. They didn't make him an admin, but he does have access to the dashboard. I can't tell what his role is, but it's probably along the ...
0
votes
1answer
27 views

How can I disable access to plugin settings in wp admin for other roles

Hi I have a website where people can register a new account and access the site dashboard(wp-admin). But these users can also access settings of other plugins on my site. Is there a way to disable ...
0
votes
2answers
38 views

Display posts of certain categories to specific user roles

I'm working on a site for a school and the teachers all want to post the homework for their students online, but only so each student can see his or her own class's homework posted by their teacher. ...
0
votes
0answers
26 views

Subscriber (with read permissions) cannot view Private posts

QUESTION: Why can't my Subscriber role (i.e. logged out user) view Private posts with the read_private_posts (or read_private_pages) capability extended to them? I use the Capability Manager Enhanced ...
0
votes
1answer
22 views

Custom user types getting html sanitized in posts

For default user types (admin, editor, etc.) style tags are not stripped from posts when saved. For custom user types, style tags are being stripped. I've applied filters in my funcitons.php file to ...
0
votes
1answer
22 views

Is there a hook that triggers when grant secondary user role in Wordpress?

I know when change primary role, set_user_role will be triggered, is there a similar hook for grant secondary roles?
0
votes
1answer
26 views

How to allow suscriber to access specific pages in dashboard?

I want to create some pages in admin dashboard which are also shown to subscribers. Normally subscriber can see dashboard page and profile only. I want to create a page called Orders and show to ...
0
votes
1answer
23 views

Give wp-admin access for shop managers

I setup some new roles for shop-managers in my woocommerce shop but i have no idea how to enable access to wordpress dashboard. I created new options for it but i cant find anything to enable the wp-...
0
votes
0answers
7 views

Keep Page hierarchical order on Control Panel when I use 'remove_cap' 'edit_others_pages'

I'm admin user and just created several editor users who are 'NOT' allowed to edit other pages. Let me call them 'master editor','editor A' and 'editor B'. 'master editor' can edit top level parent ...
0
votes
0answers
51 views

Restrict media library uploads by user role

I'm currently using the "user role editor" pro plugin to restrict wp-admin features by user roles. I couldn't find any possibility to restrict media library upload by user roles. What I want is to ...
0
votes
0answers
22 views

scripts in Wordpress pages are filtered

I have rich snippet scripts I'd like to place on my wordpress pages, for instance: <script type='application/ld+json'>{"@context": "http://www.schema.org", "@type": "Event", "name":" Reading &...
0
votes
0answers
17 views

Blank Screen Edit Page when using Editor Role

When I’m using other user roles to either edit page,add new page or event post I’m getting a blank screen. I thought it’s the W3 Total Cache doing this yet after I uninstalled it the problem still ...
0
votes
1answer
18 views

Allow admins to login as other users

My question is about WordPress in general. How can I give admins the ability to log in and do things that other users can do? My specific use-case for this is, in WooCommerce, when an admin creates ...
1
vote
1answer
40 views

change wp user status from wp_users table

The wp_users table doesn't seem to change when I change a user role from editor to administrator via phpmyadmin when I edit it. Where is the user's role stored in the WP database? Any clues?
0
votes
0answers
12 views

User switching through frontend without going to wordpress admin panel

I have two user roles for example, 1.staff 2.Instructor I need to switch to staff when I am in instructor when clicking a button in frontend. As same as I need switch back option also to switch back ...
0
votes
2answers
27 views

Want to add post to user dashboard

I would like to add edit.php to user dashboard who registers as subscriber on a website. Code which i using is add_action( 'admin_menu', 'remove_menus' ); function remove_menus(){ if(!...
0
votes
3answers
40 views

Remove dashboard links from wordpress

I am trying to remove two links from users dashboard keeping it on admin but it goes off on both user and admin. One i need to remove from user dashboard and other is contact form plugin link contact....
0
votes
0answers
15 views

Instructor can view, edit, delete only theirs courses

In LearnDash there are courses, lessons, topics and quizzes. I want each instructor to view, edit, delete only their own courses. I managed to do so in the course and topic level but I don’t know how ...