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
1answer
20 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
0answers
18 views

How to Customize Widgets based on User Role? [on hold]

I have a WordPress website and I have custom User Role called "AdsUsers" this created for users that have permissions to manage the Ads Widgets that located on the sidebar, but as you know the ...
0
votes
1answer
30 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
39 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
26 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
24 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
19 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
21 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
22 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
15 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
6 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
23 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
19 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
16 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
17 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
25 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
10 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
25 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
31 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 ...
0
votes
0answers
17 views

Editor User Role can't see other users media

The Editor role can't view/access other users media. Apparently, the website was working good everywhere but a few days later we noticed that. If we assign Administration roles, it works., Actions ...
0
votes
0answers
35 views

Front-end submitted post is published with admin ID as author

I have a form for registered users to submit a post from the front-end of my site. The post is registered in a custom post type, all works. But now that I have to add a button for the user to delete ...
0
votes
1answer
67 views

Array to string conversion error in PHP 7.2 when returning user role as class

Disclaimer: I'm rubbish at PHP, so please bear with me as I'm still learning. I'm getting the PHP error Array to string conversion for the following code: function osu_add_role_to_body($classes = '') ...
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
24 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
36 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
1answer
26 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
17 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
51 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
1answer
35 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
32 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
3answers
32 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
30 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
24 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 ...
2
votes
1answer
202 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
1answer
451 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
101 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
39 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
17 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
45 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
33 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
23 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
27 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
1answer
26 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
154 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
21 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
18 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 ...