Skip to main content

Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
0 votes
2 answers
6k views

Add Media Upload Capabilities Needed for Custom Role for non-Posts

I finally managed to update an old WP 3.3.1 site to WP 4.1 with few issues, but one unexpected change seems to have come about with relation to file uploads. In the WP 3.3.1 version of the plugin, I ...
floatingpointmatt's user avatar
0 votes
1 answer
3k views

Updating User Meta with SQL Query

I have a Wordpress site that needed to have 9,000+ users imported to set up a Directory Listing. I imported them from an existing MySQL (non-wordpress) database and everything imported just fine. ...
the gearbox's user avatar
0 votes
1 answer
462 views

how to change user roles for users who doesn't have any. (about 8000 users)

We have about 8000 users who doesn't have any roles. we need to change them to "contributor". How can I change them to "contributor"? Should I do on database? if so, which fields I need to update? ...
pulla's user avatar
  • 713
0 votes
1 answer
195 views

how to make author to write comment on only his own posts?

i want restrict my registered authors to write comment to other posts except his own posts. Is it possible? I have no idea how to do it. May be need conditional logic but how?
Ramin Mahmudov's user avatar
0 votes
1 answer
1k views

Blocking Administrative Access to Authors and Subcribers?

I would like to turn off admin panel for authors and subscribers. Is there any secure way to keep them away from admin panel?
tolga's user avatar
  • 11
29 votes
6 answers
31k views

Is there way to rename user role name without plugin?

Is there anyway to rename a user role name via hook, instead of using plugin? Edit For example, administrator » owner
Sean Lee's user avatar
  • 1,109
16 votes
3 answers
35k views

How to get role of user

I need to get the role associated with a user -- not the "currently logged in user". I am using Buddypress (not that should matter to the nature of this question) and I am in the bp_members() loop. ...
frank13's user avatar
  • 377
16 votes
2 answers
15k views

Give Editor Access To Sidebar

I want to give the Editor Role access to editing the sidebar and it's contents. I have a text widget in there and in order to edit this text widget the user needs to be an admin - this sucks. How do I ...
Howdy_McGee's user avatar
  • 20.7k
13 votes
4 answers
23k views

How do I remove dashboard access from specific user roles?

I'd like to prevent certain user roles from accessing the dashboard http://www.openeye.net/wp-admin/ at all. I've moved and restyled user profiles to a new page that's viewable on the site. How would ...
Zach Shallbetter's user avatar
13 votes
3 answers
24k views

Find out if logged in user is not subscriber

Is there a conditional tag that will allow me to display certain content only if the user is NOT a subscriber?
Nasir Zia's user avatar
  • 293
12 votes
2 answers
12k views

What action should I hook into when adding roles and capabilities?

I'm going to be using add_role() and $role->add_cap() to set up a new custom role and attach a new capability to existing roles. I'm wondering where the best place to do this is? Obviously I can do ...
Tom Auger's user avatar
  • 7,066
12 votes
7 answers
23k views

Disallow user from editing their own profile information

I'm currently developing an intranet and I am using Justin Tadlock's Members plugin to control roles and capabilities. I have created a HR role to allow Human Resources staff to create and edit user ...
Scott's user avatar
  • 12.3k
11 votes
4 answers
2k views

Custom post type role permissions won't let me read

I cannot get it so that my user role for a supplier can read the shipments post type. It shows up in their menu but when you click on it you get you are not allowed to view this page error message. ...
Nicholas Koskowski's user avatar
10 votes
5 answers
35k views

what's the meaning of the field wp_capabilities in table wp_usermeta

I am new to wordpress, in table wp_usermeta I notice that we have a row meta_key meta_value wp_capabilities a:1:{s:13:"administrator";b:1;} First, what's the meaning of ...
diligent's user avatar
  • 279
10 votes
3 answers
20k views

Check if user is admin by user ID

Any ideas how to check if user (by user ID) is administrator? I don't mean currently logged in user.
jmeinlschmidt's user avatar
9 votes
1 answer
8k views

Execute a function when admin changes the user role

How can I execute a function, when admin changes the user role of a user? I have two user roles: one is agent and the other one is client . My need is that when admin changes the user role of ...
ron r's user avatar
  • 333
8 votes
3 answers
8k views

What do unfiltered_html and unfiltered_upload actually filter?

Among WordPress' capabilities are unfiltered_html and unfiltered_upload, however I have yet to find any documentation about what specifically they allow or prevent in their filtering. The only ...
j08691's user avatar
  • 775
7 votes
3 answers
9k views

How to enable a site administrator to edit users in a WordPress network/ multisite setup?

I have a few sites in a network. I don't want the site administrators to manage things like network plugins, but I would like them to be able to edit profiles of all network users, not use those on ...
cwd's user avatar
  • 1,852
7 votes
2 answers
24k views

Restrict admin access to certain pages for certain users

As the title says, I'd like to restrict back-end access to certain pages for certain users. While doing a site with 45-50 pages, I realised it would be a much better user experience if the Page menu ...
BoBoz's user avatar
  • 356
6 votes
5 answers
13k views

Troubleshooting a "You do not have sufficient permissions to access this page" error

I have a multisite installation running WP 3.5. My main site and a few other blogs on the network work fine. However, if I register a new user and site, that user gets the "You do not have sufficient ...
cpilko's user avatar
  • 715
6 votes
2 answers
3k views

Allow roles below admin to add subscribers only

I want to give a group of user types (Editor + a custom role) the add_users /create_users capability. The only catch is that I wanted to limit that capability to adding 'subscriber' type users only, ...
Tomas Buteler's user avatar
6 votes
3 answers
5k views

Custom user role cannot see or modify featured image

I have created a custom post type called Event and I have enabled support for featured images in my functions.php file, but still my custom user role can not see the featured image meta box on the ...
Cyclonecode's user avatar
  • 1,164
6 votes
2 answers
12k views

Show admin bar only for some USERS roles

I have 4 users roles on my wordpress platform (role1, role2, role3, role4) I'm looking for to show front-end top bar only for Role1 Role2. how can i add a condition on this code to show it only for ...
Samuel's user avatar
  • 344
6 votes
2 answers
8k views

Publish author posts only with editor approval?

I run a multi author blog and i am looking for a non plugin solution. The default author user role in Wordpress can publish posts without any approvel - look at Role Capabilities Wordpress Codex. ...
NewUser's user avatar
  • 557
6 votes
3 answers
12k views

Change default admin page for specific role(s)

I was wondering if anyone knew of a plugin or a way programmatically to change the the default admin page for a specific user/role? I have a master panel page for my plugin currently setup with ...
Zack's user avatar
  • 1,534
6 votes
3 answers
5k views

How to let contributors to create a new revision(draft) editing their published posts

I'm using a custom post type to let contributors have a personal page on the site. Any time a user registers on my site a script creates a custom type post that has the registering user as the author....
bluantinoo's user avatar
5 votes
4 answers
23k views

Restrict custom post type view by user role

I've created a custom post type and created a couple of custom user roles and want to be able to restrict the view of the post type based on the specific roles. Is there a straightforward way to ...
Brob's user avatar
  • 271
5 votes
4 answers
6k views

How to hide media uploads by other users in the Media menu?

Simply put - how might I completely hide media files uploaded by any other users other then themselves? Id like to disable access to these links & files since they are a way for non-admin users to ...
Mr.Brown's user avatar
  • 1,025
5 votes
3 answers
2k views

Assign a Custom Role to a Custom Post?

I been looking around for this, but couldn't find a way. The scenario is: I have a custom post type 'Company', and I'm creating Company type posts through my plugin's code. When I create a new ...
Rutwick Gangurde's user avatar
5 votes
1 answer
3k views

How to remove administrator role in settings -> general -> New User Default Role?

I don't want to accidentally select Administrator role. So is there a way to remove it from Settings -> General -> New User Default Role ?
PrivateUser's user avatar
  • 3,459
4 votes
2 answers
3k views

How to force listing contributors in authors dropdown menu

I am aware that contributors cannot publish posts, and that by design WP will not show contributors in the author dropdown list (this has been discussed here: Contributors missing from author dropdown)...
Riccardo's user avatar
  • 961
4 votes
2 answers
4k views

Add role across network in multisite

I have been trying to add new wordpress roles and capabilities, in a multisite installation, using the code below. The issue is, it only applies to the 'main' site of the multisite, and does not ...
Anthony F. Camilleri's user avatar
4 votes
1 answer
1k views

WordPress Capabilities: edit_user vs edit_users

The official documentation only mentions edit_users, but in the source I found many places are using edit_user, what is the difference? Are there any conventions for singular and plural capabilities? ...
Howard's user avatar
  • 113
4 votes
1 answer
1k views

Restrict users on multisite WordPress install

I have a series of sites that I maintain as part of a WordPress multisite install. I'd like to be able to create users accounts that are restricted to viewing only a single one of these sites. Is ...
Nathan Friend's user avatar
4 votes
3 answers
4k views

How to assign capabilities to user NOT to User Role

Is there any way to assign custom capabilities to user, I'm NOT talking about User Role. I'm running a multi author blog where I assigned user role of "Author" to all of my authors. But I ...
Amit Kosti's user avatar
  • 3,600
4 votes
1 answer
451 views

Can I make user role that can only access a certian content type?

I would like make a custom role that can only access a custom content type that I'm going to be creating in the admin. Is that possible and does any know of any examples or tutorias that I should ...
Paul Sheldrake's user avatar
4 votes
1 answer
1k views

Contributors missing from author dropdown

I have a problem with Quick Edit post functions. When I add new users as Contributors, they don't appear in author dropdown list. I am using Role Scoper plugin for some roles. But I tried to ...
Zavalin Ivan's user avatar
4 votes
2 answers
13k views

Custom CSS In Admin Only For Certain Roles

I'm looking to apply custom CSS in the admin only for a certain user role, "Contributor" to be exact. Everything I try either seems to have no effect, or produces a 500 error. What I've tried has in ...
CalvT's user avatar
  • 334
3 votes
1 answer
3k views

Create user role restricted to specific CPT

I am trying to create a role that can create and submit to a CPT only. When I take away edit_post from the role, it revokes the ability to create and edit any of the assigned and registered CPTs as ...
Ollie's user avatar
  • 81
3 votes
1 answer
716 views

Send a confirmation of user role upgrade conditionally

I'm using this snippet of code to send a confirmation email to user's when their account is upgraded to a new user role. function user_role_update( $user_id, $new_role ) { $site_url = ...
Pollux Khafra's user avatar
3 votes
4 answers
11k views

Capability to edit own posts and not others

What is the capability that let users to edit their own posts and not others? I am trying to enable the post authors to avail a plugin function only on the posts they own. The permission to access ...
Netizen's user avatar
  • 179
3 votes
1 answer
4k views

Remove admin AND editor from the "change role to" menu in user listing

I have a snippet in my functions.php that removes the admin role from the "change role to" drop down menu in the users listing screen, so that editors who can list users and manage roles won't be ...
Ismael Latorre's user avatar
3 votes
1 answer
4k views

Disable text tab on WordPress text-editor

I'm looking for a way to disable text tab on wordpress text-edito (red square on the pic) for all my users roles except ADMINISTRATOR because i don't want them to have the possibility to add ...
Samuel's user avatar
  • 344
3 votes
2 answers
6k views

Code needed to only show users own posts in a multi-user account

I am using WP3 and want to starting adding users (many users to a single blog) but when I give a new user an account, they can see all the posts in the admin including scheduled, drafts, pending ...
ogp's user avatar
  • 31
3 votes
3 answers
13k views

Temporarily disable user role login and replace with message

Is there a simple way to temporarily stop a user role logging in with wordpress? For example, if I have a user role called media, how can I block them from logging in? I would like a custom message to ...
Joshc's user avatar
  • 1,520
2 votes
3 answers
26k views

Displaying which Role the current user is assigned to

Is there a section on the admin panel of my WordPress installation which just displays what role the current logged in user has? For example, I know I have administrator permissions because I know ...
mikelovelyuk's user avatar
2 votes
1 answer
2k views

wordpress separate registration for different roles

When a user click on a link to register it should assign them a different role, and not the default role. I've tried this link but it doesnt seem to work. I've placed it in the functions.php. ...
Charles Xavier's user avatar
2 votes
1 answer
551 views

Make certain pages uneditable by editors?

My Wordpress page has a few editors. They need this permission because they need to be allowed to change the posts/pages of others. However there two pages I want only me, the administrator to be able ...
Hedge's user avatar
  • 133
2 votes
1 answer
402 views

How-to Delay The Capability To Publish Posts?

I use buddypress and all new members have the role of author. The site is more like a forum with one topic. I'm not worried about comments, just posts. Recently I have received a bunch of spam from ...
john powell's user avatar
2 votes
1 answer
2k views

Shold I manually add 'cap' to admin role ?

I've created a role: $role = add_role( 'role', 'role', array('read' => true) ); and so created a cap: $role->add_cap( 'cap' ); after this I'd created a submenu in admin menu with 'cap' as ...
Victor Aurélio's user avatar