Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to create an anonymous forum?

I am trying to create an anonymous forum with WordPress. This idea would be that users could create an account in order to follow their posts and answers, but nobody except themselves could see their ...
3
votes
1answer
25 views

How to prevent users with “edit_others_posts” capability from editing admin posts

I have some posts that author is Administrator and some other posts that author is Editor After logging in as Editor, I can edit Administrator posts. I would like to prevent this. I find some ...
0
votes
2answers
17 views

Find count of WordPress users by role and search string for user name

I want to get the total number of results after searching WordPress users by role and a string that matches the user name. What I tried so far: $args= array('echo'=>false, 'role' => 'author', '...
0
votes
0answers
8 views

Tiered or parent/child user reistration [closed]

I need to create a resource portal for an yearly employee improvement event that we hold for several companies and I need some help plugin advice for user registration. All registration will be done ...
0
votes
2answers
26 views

How to display total user count by specific role in WordPress as statistics?

i want to display in my Home page total user count by specific role in WordPress as statistics I already created Role (subscriber, contributor) and i want to show the total users for each of those ...
0
votes
1answer
17 views

How to restrict subscriber editing other posts but read specific posts in backend

I need to allow Subscribers to edit their posts (done) and read (see in backend) posts of specific author or with specific ID (to make copies of it). I found the code, but that's not enough: function ...
1
vote
1answer
17 views

What determines whether admin toolbar is shown to a logged-in user?

By default, Wordpress shows admin toolbar to Administrator, Editor, or Author but not to Subscriber or unauthenticated visitors. What determines whether admin toolbar is shown a logged-in user? I am ...
2
votes
1answer
18 views

Why do comment moderators need to have all create/edit/delete toboth posts and pages?

I struggled quitea bit to be able to set up my moderator account. Until I allowed all posts and pages capabilities and now the can finally moderate comments. I didn't deactivate one by one precisely ...
1
vote
0answers
24 views

wordpress user roles are not working

I have never assigned or used a role before on this site, I have just created a new user role with plugin "user role editor" and also assign an editor Role to other account, whenever I log ...
0
votes
1answer
15 views

Remove check boxes and its label from screen option for custom role

I want to hide many check boxes and its label in screen option only for custom user role (wdm_instructor and group_leader). How to apply below code so its for custom user role only: add_action( '...
0
votes
1answer
8 views

Every change made by “Author” role is going to “pending review”

I don't know if this is an issue with the module https://wordpress.org/plugins/user-role-editor/, or this is an internal behavior of WordPress, but for some reason, every time a user with "Author&...
0
votes
0answers
7 views

Woocommerce Filter Table biy price role

I am currently using two plugins in my store WooCommerce pricing by user role WooCommerce Dynamic Pricing & Discounts is there a way to make a table for me to filter product prices by user role?
1
vote
0answers
17 views

Only view/edit/delete CPT made by users with the same role

I have created a custom post type (CPT) called "books" where users will be able to exchange "bookid" and "bookinfo" (as ACF). I have created user roles such as Countries ...
0
votes
1answer
23 views

how to create user profile pages and display them based on users roles

Example: I have a website with 3 different user roles (amongst others): *developers *designers *contributors I would like to have profile pages for users and would like to be able to display users on ...
0
votes
0answers
14 views

Can I add a rule that changes a role?

For instance once a customer spends $500 change the role to subscriber. I would like it to automatically change and then reset at the beginning of every month. Is this possible?
0
votes
0answers
11 views

Restrict Users to Only Edit Media Owned by Users in Their Role

I want my users to only be able to edit media that is owned by other users in the same role as them... So far all of my research online the past two days have resulted in almost nothing useful to me, ...
0
votes
2answers
41 views

Removing menus from users other than the administrator

I want to remove some of the menu links from all users except the administrator. How can I do it?
0
votes
0answers
16 views

Add_role on plugin activation not working… what am I missing?

So I'm in the middle of writing a very simple plugin that I need to add a user role on activation (and remove when deactivated). The plugin is firing fine, and I know my activation function is firing ...
2
votes
0answers
17 views

Registration and Custom Post Types - How to synchronize information?

I am building a platform where service providers can offer their services to potential customers. Therefore, I have two user roles, one "customer" who can only create an account and read; ...
0
votes
0answers
18 views

A specific User must select a parent post to publish a post

function wbg_custom_attribute($pages, $parsed_args){ global $wpdb; $user = wp_get_current_user(); //print_r($output); //print_r($pages); if ( in_array( 'translator', (array) $...
0
votes
0answers
11 views

How can I add specific roles in the registration form to make the user choose his role?

I tried this code but it causes showing of all roles even administrator .. I want to choose specific roles like editor and subscriber add_action( 'register_form', 'myplugin_register_form' ); function ...
0
votes
0answers
24 views

How to get translated role names from different plugins?

For some reason in edit-user.php I have to do a checkbox list of user roles. I got it but I have a problem of translation. My code <?php foreach ( $roles as $role_id => $role_data ) : ?> ...
0
votes
0answers
16 views

Hide certain theme options under customizer for certian user roles

I'd like to hide only certain theme options from certain logged in users (editor role). What do I need to add to the below? The below works but also removes it for the Admin user. I would like to deny ...
0
votes
0answers
13 views

Creating relationship to custom types

I'm working on a project that requires a relational model between custom types and fields. Here's a diagram of what I'm trying to achieve: I'm looking for some guidance/sanity check to accomplish the ...
0
votes
1answer
18 views

Conditional post thumbnail based on logged status and post tag

I'd like to show different post thumbnails in archive.php and category.php like this: user logged out & post has tag "private" -> shows a "default-private" image user logged in & post has tag ...
1
vote
0answers
9 views

How to set individual capability of post type in individual category

I need to add a new post type "Story". Each of my users I will give them an individual role to edit/view their own "Story"(One user one role). User Role only gives ability to limit capabilities based ...
0
votes
1answer
19 views

Custom author url and page for another role

I would like to create a custom url and a separate or duplicate the author.php template for another custom role w/o using plugins. I found this related topic but it just modify the author url ...
0
votes
0answers
19 views

hide pages for the page list for some user role

I need a way to make some pages not visible for 3 users role (editor, contributor, author) on the page list (edit.php?post_type=page). I think it is about permissions but i dont know how to do it. I ...
1
vote
1answer
15 views

Displaying different in-page content to cliente/admin

i'm a young informatic engineer student who is developing his first wordpress website. It is a booking website when a client can see the available hours in certain local and book it, and the local can ...
0
votes
0answers
9 views

allow authors/editors dashboard access with limitation

I want to allow my authors/contributors/editors to access the dashboard access without allowing them to access any plugins or any other items other than create posts and add contents. there are a ...
1
vote
2answers
40 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
21 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
10 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 ...
0
votes
0answers
29 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
28 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
32 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
7 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
30 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
13 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
31 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
26 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
31 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
22 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
9 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
22 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
30 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
39 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
2 3 4 5
25