Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
6 views

WP- Can't seem to Sync new & changed Multisite user roles

My first time here so please bare with me if my terminologies arn't to standard. I have created a multisite network where users can register to create sites "theirsite.mysite.com" Firstly what I am ...
0
votes
0answers
19 views

Remove custom role when subscription expires

I have two different types of subscriptions (basic and plus) and have a different role assigned depending on which subscription is purchased (3rd party plugin). So when the basic is purchased, they're ...
0
votes
1answer
9 views

How can I restrict the categories users can post in, based on user roles?

So far I've only found plugins that are either obsolete or only affect which categories are displayed. EDIT: The result should be that users can only select certain categories when they publish their ...
0
votes
1answer
29 views

Shop Manager role cannot edit pages using WPBakery Page Builder [on hold]

I'm using both WPBakery Page Builder version 5.4.7 and Woocommerce version 3.5.1 on a site I'm working on. Even with the settings enabled for the Shop Manager role to access and use the Visual ...
0
votes
1answer
17 views

How can I prevent users from creating new categories?

I've set up some categories. I don't want users to add new ones. How can I do this?
0
votes
2answers
24 views

Administrator Posts

I'm trying to prevent anyone in the Editor role from editing posts made by an Administrator. The Editor's can edit each others posts, just not an Administrator's. Is this possible? I've tried the ...
0
votes
1answer
35 views

Best practices to handle multilpe roles and capabilities?

Consider a complex system made in WordPress with multiple roles and capabilities. Let's take a University website, for instance. A University website could have a capability to post news to the home, ...
-1
votes
0answers
9 views

Custom roles in WordPress (add_role)

I'm not much aware about using custom roles in WordPress, but recently I saw add_role() function on the codex, and I'm looking to incorporate it in one of my websites. Using custom roles, I want to ...
-1
votes
1answer
24 views

Enable plugins for a specific user role

I've created a new user role(based on shop manager) with user role editor, i need to show a custom plugin for this role. Thanks $user = wp_get_current_user(); if ( in_array( 'custom_role', (array) $...
0
votes
0answers
12 views

Displaying Images from Gallery by user

I'm very new to Wordpress and websites and I'm building a site which allows users of a specific role to login and upload photos to their profile page and then those photos be displayed on another page ...
0
votes
0answers
15 views

Restrict specific user to manages posts in specific category

I explain this with an example. In my blog I have 2 users: John Paul that write posts. Posts have 2 categories (to be precise, it's a custom taxonomy): Cats Dogs John manages the Cats section of ...
0
votes
1answer
17 views

wordpress editor role remove all but 'menus' in appearance menu

I'm trying to remove access to everything in the appearance menu in WP admin for the role editor. Or at the least, just remove access to themes and plugins. I have found how to remove the whole ...
0
votes
0answers
30 views

Define custom roles and show different pages based on the role

I want to custom Implement Multiple types of users on Wordpress, and i'm unable to figure out how to make this work. Registration form will register all user-role as "AUTHOR" I want users to be able ...
0
votes
1answer
33 views

Buddy Press restrict the capability to edit users

im trying to modify the Wordpress capability 'edit_users' for my plugin. In my case some User Roles should have the ability to modify some other Users with an specific Role BUT not every other Users. ...
0
votes
1answer
22 views

get_posts() not working when accessing with a custom user role

I've stumbled across something that I can't seem to find any documentation on regarding WP 'get_posts' function. I've got a web application that has multiple custom post-types and multiple custom ...
0
votes
0answers
21 views

Visual Composer disabled overnight for anyone but the admin

I have been using visual composer on my site for about a year now with no issues but today when anyone logs in who aren’t admins , they no longer get to use visual composer to edit anything and ...
0
votes
3answers
18 views

Pre_get_posts only show posts by administrator roles

I am trying to filter a query to only show posts that are posted by a user with the administrator role. I've created a pre_get_posts action, and trying to use $query->set to filter the posts only in ...
0
votes
1answer
22 views

Show menus to one admin username

So I've got this code which does the reverse of what I want it to do. add_action('admin_menu', 'remove_admin_menu_links'); function remove_admin_menu_links(){ $user = wp_get_current_user(); /...
0
votes
1answer
22 views

Roles see different top menu (nav menu)

I'm new to WordPress but has some knowledge in HTML, CSS and and a little of PHP. I'm trying to make a new menu in "top menu" that will be hidden to users that are not admin, but will appear to admin ...
1
vote
0answers
40 views

How to allow editor to edit privacy page / settings only?

In my WordPress installation (4.9.8.) the editor role isn't allowed to edit the privacy page. It would work with following in my functions.php: $role_object = get_role( 'editor' ); $role_object->...
0
votes
0answers
8 views

Publish_posts only if taxonomy term is checked

I have a custom user role that is not allowed to publish posts. I wonder if it would be possible to make an exception to this if any term of a specific taxonomy has been checked? So the user can only ...
0
votes
0answers
14 views

User role hook on every change

I am actually developing a plugin to sync user roles to another database. I am using the set_user_role hook and it works in most cases. My problem now is that another plugin changes user roles ...
0
votes
1answer
74 views

Ajax call not working anymore

I had a few functions I was calling with ajax...basically, everything was working as expected and now it's not. I'm not sure what could be causing this problem. I have a button on my page like so: &...
0
votes
0answers
23 views

How to limit WordPress author role users to specific categories?

By default, users no matter which role they belong can publish posts to any or all of the categories. what I want is to limit users of specific role to specific categories. For example, I have books ...
0
votes
1answer
22 views

How to show private pages based on a user's role?

For example. User "Mary" should be able to view to the private page "marys page" after logging in, "Tom" should be able to view the private page "toms page", etc I created new users and am using the "...
0
votes
0answers
16 views

Not allow add New Page for role 'editor'

Sorry for my English first. What I want to achive is, that it is possible to change existing posts and not possible to add New Posts for the user role "Editor". Is it possible with wp caps or do I ...
1
vote
1answer
35 views

How to change user starting role in WordPress MultiSite?

I am using WordPress MultiSite. Where can I change user starting role? It does not show under Settings > General > New User Default Role.
0
votes
1answer
24 views

Read-Only custom post type

For the contact form of my own theme I have created a Custom Post Type in which the messages of the users are automatically stored. In the administration area the messages can be read similar to ...
0
votes
0answers
21 views

Change output on WooCommerce Order Details page based on User Role

I'm trying to add the User Role from an order as a CSS class to the Order Details page in WooCommerce in order to remove the PAID text for a specific user role. I've been able to do something similar ...
-1
votes
1answer
23 views

Restrict the shop_manager role to the WooCommerce Orders Page

I want to show only the woocommerce orders page to shop_manager role, and restrict users with the shop_manager to only that admin page. If not show them this message: Sorry, you are not allowed to ...
0
votes
0answers
17 views

How to add specified user role's all users list on drop down menu of Buddy Press custom add profile field

Is anyone an idea to add separate user role's all users list in drop down menu of custom add profile field of Buddy Press ? For example I have three types of roles. Admin,Doctor,Patient. I ...
0
votes
0answers
10 views

Get Users list by separate field.

Is it possible in WordPress or Buddy Press that get users list data as per specific field. Which field filled by user at the time of registration. For example in hospital management site The ...
0
votes
0answers
9 views

User show only assigned users data

Is any plugin available on WordPress or Buddy Press which get capability to create users who shown only their assigned users data. Not all users data. For example : I have three types of user role. ...
0
votes
1answer
25 views

Create relationships between users or user roles

I have a site where doctors and patients are registered. It provides services like where patients (role-patient) are registered themselves and after my support person (role-support) assign that ...
0
votes
1answer
66 views

Iframe disappears when author updates page

If a user has an author role and is listed as the author of a page, when they make changes to the page and click update, the changes are made but the iframe that was in the wysiwyg disappears and no ...
0
votes
0answers
31 views

disable specific plugin if logged in with an administrator role

I found this trick to allow me to do what I want. This is the code : add_filter( 'option_active_plugins', 'disable_logged_in_plugin' ); function disable_logged_in_plugin( $plugins ) { // The '...
0
votes
0answers
18 views

Permission to edit/save but not publish/update pages

I'm helping our local school setup a website/homepage and it's important to the principal to be able to review all page changes done by others. Other users should be able to make tentative changes to ...
0
votes
0answers
19 views

Check what capabilitie(s) an action requires

I can check whether a user has a given capability or not with user_can() function, but how can I check what capability a certain action requires? For example, I'm using WP Job Manager plugin, this ...
0
votes
1answer
17 views

Disabling user capability to edit_posts or delete_posts in the front-end

I've created a post edit form in front-end of the site, this form is accessible on the front-end ONLY if the user is logged in. Now, for some reason, upon a certain condition is met, I want to DISABLE ...
0
votes
0answers
26 views

If user had specific role

I want to display on the profile page something(a badge) if user had a specific role (not current_user_can). I don't found the function on Wordpress Codex. Can you help me ? EDIT : Found a solution: ...
0
votes
0answers
29 views

How can i redirect user to specific page

I have a WordPress site for the property management, I have 6 properties in the different city managed by the different property manager, I would like when tenants are login redirect them to the ...
0
votes
2answers
21 views

Switch role on submit button

I am working on a tournament website. When you register you have the role "Member" and you can create a CPT " team". I created a "TeamAdmin" role with capabilities to edit_published_posts, so the ...
0
votes
0answers
30 views

Can't remove a role's “edit_others_posts” capability for a custom post type

I am having trouble trying to remove a capability for a role on a custom post type. I have a CPT defined as function register_cpt() { $labels = array( 'name' => _x( '...
0
votes
2answers
145 views

Remove admin bar for subscribers

I have a membership site. I need to disable the admin bar for the subscribers. I have used this code below: add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!...
0
votes
0answers
8 views

Get online users by their role

I have a couple of members having different custom roles in my site. For Example, when anyone registers, they register under a group and the group name is append with their display_name in wp_users ...
0
votes
0answers
47 views

Customizer – Allow user editor to change website title and tagline

In the customizer you may change the site title and tagline (input fields) under »Site title & tagline« as an admin. When logged in as an editor the menu item is visible but when clicking on it ...
0
votes
0answers
16 views

Add another role to a user when they click a button?

On my site, there are roles "user, authors, etc.". Default role for user is "User" which I want to keep it for all users. How to add another role to a user when they click a button? I tried with my ...
0
votes
1answer
33 views

User roles are changing automatically

I am facing a strange issue. Some of my user roles are changing automatically. I searched in the whole project and cannot find the location from where user roles are changing. So I added the following ...
0
votes
0answers
23 views

Allow multiple roles to specific user

I want create a plugin for when I edit some specific user from back end so I want an option to apply multiples roles for that user for some specific time period. How can i apply multiple roles to ...
0
votes
1answer
62 views

Disable plugin for administrator

I need to disable a specific plugin for administrators. I found this piece of code that should do the trick, but it's not working for me. I don't really know much about PHP so I don't know how to fix ...