Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 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
9 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
39 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
15 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
15 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
9 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

Cannot change author of custom post type to a custom user role

I have a custom post type and a custom user role that can only create this post type. If I try to transfer the author, I only see my admin user as option, I don't see my other users with custom user ...
0
votes
0answers
15 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
8 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
17 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
17 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
38 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
27 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
26 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
27 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
26 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
16 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
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
28 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
38 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
35 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
12 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
32 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
23 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
18 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
25 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
11 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
18 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
2 3 4 5
25