Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
0
votes
2answers
27 views

How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?

(Edit: going for the "Student" badge, and wondering if anyone out there could up vote this question?) I answered a question about capabilities, but now I'm in need of help on the subject. And after ...
0
votes
1answer
17 views

Remove plugin settings from post creation page for a user role

I want to remove plugin settings from the bottom of the post creating page for a given user type. I want to remove the "Plugin Organization" drop-down from the post creating page for a specific user ...
0
votes
0answers
8 views

Allow an Editor to create a new user with only the role of Client

I have a customer who had the Editor role. I created another role called Client. I want the Editor to be able to create a new user but only allow him to assign that user the "Client" role. I don't ...
-1
votes
0answers
8 views

Woocommerce blocking custom role to access admin_bar/admin_access

Developed a plugin which will add_role() called backend_user during plugin activation. In the plugin I had designed a controller which enables access to certain pages of 'my custom plugin menu' for ...
0
votes
0answers
25 views

Limit Media Library Access to Specific Folders

I have a site that will host about 100 "Clubs". When users are created, I am assigning them a "Club Leader" Role that identifies them as being a part of a club in general, but I am using a custom meta ...
0
votes
1answer
22 views

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?

I am toying around with WordPress capabilities, and having some difficulty understanding where I am going wrong. Right now, I have an admin menu that appears for all administrators with STUDENTS as a ...
0
votes
2answers
26 views

Enable a role named 'backend_user' to access my plugin pages

I am new to plugin development and I am fairly okay with development by following all the plugin development best practices set by WordPress Codex. Following code describes on how Role: Administrator ...
1
vote
0answers
6 views

Wordpress comments_open for specific user role or post type

comments_open is used for both post types, posts and products, the snippet below worked and allowed only (example) role users to comment enter code here add_action( 'init', function(){ $u = ...
0
votes
1answer
23 views

Restrict Access to Posts based on Custom User and Post Meta Data

I have a custom Post Type called Club Pages, and a custom role called "Club Leader". Club Leaders currently can only read, modify, and delete all Club Pages posts. However, there are many different ...
0
votes
0answers
12 views

WordPress Multisite Layered Admins

I'm using WordPress multisite for a company project. The project have 5 multilevel admin structure with about 100 websites. The top level (5) admin (super admin) have access to all the sites. The ...
0
votes
1answer
29 views

Display the articles of a category by role

In our intranet we have 120 locations => 120 groups => 120 Categories and 120 authors. in the home page we want to display a carousel, where we will show post's titles (with link) according to the ...
0
votes
0answers
12 views

User role adding own users

I´m looking for a feature for one of my websites. I need to create an user role (vendor) that can create his own users (client) but each vendor only can see his own created users (clients) and no the ...
0
votes
0answers
25 views

WP_Query and Meta Query filter custom post type by capability

I am currently using WP_Query for my custom filter function of a custom post type and I would like to filter this if a user has a capability. Using roles is also an option, but it would be easier if ...
0
votes
0answers
21 views

Execute a ultimate member action when user role is updated

I want an Ultimate Member action to be performed when I assign a particular role to a user. A role "old_member" exists. If I assign this role to a user, the account should deactivate itself with the ...
0
votes
0answers
8 views

Custom home page instead of profile page

I would like to display a custom welcome page when a user with a specific role is connected instead of profile.php page. I created a redirection. All work fine. function wpse_redirect_profile_access(...
0
votes
1answer
14 views

Wordpress hide any html element by css when user-role

i like to hide the booking_form_request by css when the user role is subscriber. please can you repair my code: if( current_user_can('subscriber')) { booking_form_request { display: none!...
0
votes
0answers
8 views

How to bulk remove capability from user role

I've got an issue where a custom user role 'member' has somehow ended up with the 'subscriber' capability. Example: Custom user role added via: add_role( 'member', 'Member', array( 'read' => true,...
0
votes
0answers
20 views

Is it possible to reindex the user roles array?

I have some situations (out of my control) where the array becomes from Array ( [0] => roleX ) to: Array ( [1] => roleY ) And I need to always have the role at index 0. I ...
0
votes
1answer
25 views

Edit a function to take different actions based on user role

I want to modify the publishorpend function below to consider the user group of the currently logged in user when deciding whether to set the post status as "pending" or "publish" (in addition to ...
0
votes
1answer
35 views

Saving user meta “member_id” based on user role

In a WP / Woocommerce with subscriptions plugin environment I manage to save in the user meta table a custom "member_id" at the user creation level: function assignuserid($user_id) { global $wpdb;...
0
votes
0answers
10 views

How to limit users to view selected forms in WP Forms?

I'm using WP Forms with my Wordpress application. I have around 10 forms and I want to dedicate each form to be accessed by one particular user only from the backend. The customers will submit the ...
1
vote
0answers
26 views

Admin User Role Unable to See Private Posts

I have set a few posts to Private. When I login with Admin role I'd expect to still see the posts but they do not appear in the blog list. Changing the posts back to public and they appear. As Admin ...
0
votes
0answers
11 views

Automatic Role Assignment on Multisite

I have a multisite, and each subdomain uses its own theme. My problem is: one of my theme is a user posting site - so users need to register and then post. How do I change the role to automatic be ...
0
votes
2answers
21 views

Limit Post Creation Count by Author or Role

I need to limit the number of posts that can be created. I'd like any variation of total posts, posts per time period (month), by author (ID) or by role. off-the-shelf plugins found so far in the ...
0
votes
1answer
21 views

Custom failed login error messages for users based on user role?

Is there a way to give users that belong to a certain user role a unique error after failing to login? Basically, I imported users from a site with a different CMS and it was near impossible to ...
0
votes
0answers
10 views

How to enable linked user groups and “on behalf of” posting?

I’m looking at creating a site with the following concept: At PR agencies, reps are responsible for creating and mailing out to journalists comments made by their client’s executives in response to ...
0
votes
0answers
16 views

Custom user roles are unable to login

I have created custom user roles 'teacher' and 'student' using members plugin. But they are unable to log in using wp_signon but the admin and other roles are able to log in. I tried using my custom ...
0
votes
0answers
15 views

Display WooCommerce account endpoint to specific user role

Here I have created a custom My Account endpoint for listing all the Costumes in CPT for that logged in user. Currently this endpointfile is included in the main plugin php file ( my-awesome-plugin....
0
votes
0answers
4 views

Create custom user role to view only 1 admin page

I've taken a look at the capabilities and roles, but it doesn't look like it's possible. But, maybe I'm wrong. I would like to create a user role, that when logged into wp_admin they can view a ...
1
vote
0answers
19 views

Custom roles showing HTML entities in title form field

I've created a few custom roles. I'm noticing that when editing a post in the Admin Area, any characters with HTML entities in the title form field are showing the HTML entity code, but only for users ...
0
votes
0answers
9 views

product sorting capability not visible on products page for shop manager

I have noticed that the capability to sort products manually is only visible with an administrator user role where when logged in as a shop manager. View screenshots attached, one is showing sorting ...
0
votes
2answers
10 views

How to set default post editor based on role?

I found this code to functions.php add_filter( 'wp_default_editor', create_function('', 'return "html";') ); but I need to limit it to a specific set of roles (such as Editor or Author). How do I ...
0
votes
1answer
13 views

grant multiple roles access to specific admin menu item

I am writing a plugin that offers an admin menu item which only a specific, custom user role ("customrole" in the example) can access. I have implemented this as follows, and it works: function ...
1
vote
1answer
20 views

Giving permission to anyone (non-users as well) with a password to edit a post, possible?

I would like to make possible to any visitors (non-users) to create a custom post from the WP frontend, then get a password in email which can let him/her edit the post if the proper password is given....
1
vote
0answers
17 views

Fix permissions for users role

I have 4 users roles on my WordPress platform (role1, role2, role3, role4) Role 1 : administaror (full acces) Role 2 : proposal_editor (can create and publish posts, pages, templates, users...) Role ...
1
vote
0answers
44 views

Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type

For a Wordpress project I made a Custom Post Type in the usual manner. Also i made a custom role. I want users with that role to be able to make, edit and delete this CPT. I added the apropriate ...
0
votes
0answers
15 views

let user select roles in the wordpress subsites

Im stuck this problem for couple of days, Lets check it out.. Site A:Social theme,Role:Subscriber; Site B:Job seeker, Roles:Candidate/Employer; Site C:real estate.Roles:User/agent/agency.and more! ...
1
vote
1answer
56 views

How to display user order by role

I am trying to display user on query but i want to display order by user role. Suppose we have 2 user role, Gold and Free. I want to display Gold user first and then free users. $args = array( ...
1
vote
1answer
24 views

How to make a customize role and view a specific plugins base on that role?

it there anyone can suggested or give me an idea. i created a customize WordPress plugin. it was called "Spark 3cx client" First when i login using "admin" account. I can view or access the admin ...
0
votes
1answer
12 views

How to exclude subscriber from the list in wordpress

Some what i have this code working perfectly, the problem is not excluding subscriber from the list, can somebody help me to exclude subscriber from the list.. thx <?php $number = 10; $paged ...
0
votes
1answer
30 views

Programmatically allow a non-author to edit a post based custom meta field

User A authored and published a post. In that post, User A selected User B as the "Manager" (a custom meta field). How can I allow User B to edit any post in which they are selected as the "Manager"?...
0
votes
0answers
11 views

How to conditionally hide pricing unless a user is either 1) logged in or 2) visiting from a special URL?

I am using WooCommerce and a plugin, WooCommerce Catalog Visibility Options, to remove pricing from users until they log in. My problem is that we frequently have sales and so I am having to either ...
0
votes
2answers
77 views

Display user role Name - not slug

<?php global $current_user; echo array_shift($current_user->roles);> Using this i can display user role slug but i want to display Name of the role. Any suggestion ? Thanks
0
votes
1answer
24 views

Change role in maintenance mode

I'm using https://de.wordpress.org/plugins/wp-maintenance-mode/ . I need to test the wp-admin page with different user roles while in maintenance mode. When I switch to a different role than admin ...
0
votes
0answers
14 views

Trying to wrap my head around the REST API, authentication, access tokens, and connecting an external app

Background and motivation I have been building an art education site for my mom for about a year and it's been a great learning experience / place to experiment. I use s2members to control access to ...
0
votes
1answer
89 views

Allow editor user to full permission to access plugin settings

I want to give full permission to editor user to access a particular plugin MC4WP: Mailchimp for WordPress https://wordpress.org/plugins/mailchimp-for-wp/ For it added below code in fuctions.php file ...
0
votes
0answers
25 views

Add custom fields to different roles?

We need to create custom fields for different roles (at least two), but we must enter these different roles the dashboard. example: creating a menu item with editor menu with the url: wp-admin/user-...
0
votes
1answer
56 views

how to make a custom field readonly or disabled by user role?

i am trying to make a simple custom field (made without a plugin) readonly or disabled for a specific user role in functions.php, is this possible ? thanks
0
votes
3answers
55 views

Change logo url based on WP user role

I want to be able to change the WordPress default logo url (not the logo image) based on the user role. The image/logo will remain the same, only the url will change. Any assistance or ideas will be ...
1
vote
1answer
55 views

Create Super Admin that cant be deleted

I want to create an admin ( role ), that cannot be deleted by other admins... something like a super admin. Of Course without using a plugin. Is a simple site. But has many admins (not by my choice), ...

1
2 3 4 5
25