WordPress uses a concept of Roles, designed to give the site owner the ability to control what users can and cannot do within the site. Each role is allowed to perform a set of tasks called Capabilities.

learn more… | top users | synonyms (1)

7
votes
5answers
4k views

Remove Ability for Other Users to View Administrator in User List?

(Moderator's note: Original title was "Remove Admin from User Menu") I have created a client administrator role which is essentially an Editor with ability to add/remove users. The article "Editor ...
6
votes
1answer
838 views

Allow Editors to edit pending posts but not draft ones

I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role: As you can see, they are allowed to edit_posts and ...
17
votes
1answer
7k views

Editor can create any new user except administrator

I have set up a WordPress site for a client. The client has the Editor role, however I have installed the Members plugin and given the client the capability to add new users to the WP admin. This is ...
4
votes
1answer
3k views

How to assign specific users the capability to edit specific pages / posts / custom post types

I'm trying to implement what seemed like a relatively straight forward idea, basically I am building an access control plugin to control viewing and editing of a custom post type (in this case ...
7
votes
5answers
3k views

WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins

I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of ...
8
votes
4answers
878 views

How do I make a draft post accessible to everyone?

I have several unpublished posts in my Wordpress website and I am trying to make it accessible for normal users (who are not logged in) using the normal post slugs (site.com/post-here). I understand ...
1
vote
2answers
696 views

When you create a custom post type, does that also create capabilities for editing/deleting that post type automatically?

For example, if I create a post type called "destinations" does that automatically create capabilities like "edit_destinations" or "delete_destinations"?
1
vote
1answer
1k views

Hooking into add_submenu_page

Ever come across a plugin that is using the manage_options capability for a page that... really doesn't need to be? Well, I've come across just that. This may be more of a general question about ...
5
votes
2answers
8k views

How to add a Capability to a User Role?

I am managing a Wordpress network and would like to add the unfiltered_html user capability to the already predefined user role of Admin. In a standard installation of Wordpress the Admin account ...
6
votes
2answers
7k views

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress ...
13
votes
2answers
6k views

Getting a List of Currently Available Roles on a WordPress Site?

When writing WordPress plugins there is often a need to set up options for which roles on the site have access to certain functionality or content. To do this a plugin dev needs to fetch the list of ...
2
votes
1answer
790 views

Apply custom role capabilities to administrator (without plugin)

I have a custom role that allows access to only a sigle custom post type. This is all well and good, but now it is only showing up for this role, not for admin and super admin. I'm having a hard time ...
4
votes
1answer
604 views

Restrict Admin Capabilities in MultiSite

update_core update_plugins update_themes install_plugins install_themes delete_themes edit_plugins edit_themes Hi, I want to restrict those capabilities to user_id = ...
6
votes
2answers
7k views

Possible to hide Custom Post Type UI/Menu from specific User Roles?

What I'm looking to do is completely hide the UI for a custom post type from specific user roles...Ive previously found many resources on how to disable access to using those CPTs but nothing that ...
9
votes
3answers
5k 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?
3
votes
1answer
261 views

Restrict users from editing post based on the age of the post

How can I restrict users (based on Capabilities) from editing their published posts after a custom amount of time. For instance, a user that can publish_posts (authors) can not edit a their post if ...
7
votes
2answers
2k views

How to create a clone role in wordpress

How to create new role with same capabilities of existing role. Eg: I would like to create a new role with same capabilities of administrator or editor and so on..
7
votes
3answers
3k views

Groups of capabilities: users with multiple roles?

I'm pretty sure I understand the roles and capabilities setup in WordPress: granular capabilities, grouped together in roles that can be assigned to users. Code should check the granular capabilities, ...
4
votes
1answer
360 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 ...
3
votes
1answer
4k views

How to assign multiple roles for capabilities array withini register_taxonomy function?

I am not sure how to add multiple capabilities to 'assign_terms' capability. My code is below, notice the capabilities array within the register_taxonomy function /* Registers taxonomies. */ ...
4
votes
4answers
2k views

Select subscriber as author of post in admin panel?

I want to be able to select a subscriber an author of a post in the admin so it displays their name as having written the post, but I do not want to give them any additional privileges (if they login ...
1
vote
1answer
268 views

How-to delay the capability to publish posts?

Spam has gotten a bit crazy so it would be nice if new users have to wait a week to post something. I use buddypress and all new members have the role of author. The site is more like a forum with ...
1
vote
1answer
1k 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 ...
0
votes
1answer
2k views

How do you add custom taxonomy capabilities exactly?

I can't see to get it. The capabilities fail to appear when using plugins like "Capability Manager" or "Members" to view a list of available capabilities. This is the code I'm attempting to use: ...
2
votes
2answers
74 views

Allow user to Publish, but not Edit or Delete

I saw post Allow Content Author to Publish, But Not Edit or Delete but is not the same I need and I cannot ask there because of reputation ¬¬ I need an user that can publish any user's post but can't ...
2
votes
2answers
586 views

Read only capability for custom post in admin area

I'm actually building custom type to WP and need to be able to restrict post access to some user role, ie. in admin area, collaborators can see posts but can't edit them, just only open them as ...
0
votes
1answer
144 views

add_cap only adding the first two in array

After numerous days of trying to track down a problem in code, it turns out that the add_cap is only taking the first two in an array. The first one (editor) will only add delete_others_pages and ...
0
votes
1answer
31 views

New Roles and Capabilities in WordPress

I am creating a new role in WordPress, and I would like it to be simlar to an 'author' role, except that this new role only allows 'working with' a specific category (in other words, it allows ...
0
votes
4answers
3k 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 ...
0
votes
1answer
70 views

how to change capability required to view an admin page? [duplicate]

Possible Duplicate: Hooking into add_submenu_page This plugin uses add_menu_page function to create an admin page and I was wondering is there a way to change the capability that is set by ...
0
votes
1answer
1k views

Why is wp-login redirecting to the home page when I use this function?

I'm perplexed; I can't see where I'm going wrong with this code. It should redirect any subscriber-level users back to the site home page if they try to access anything within /wp-admin - but not if ...