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)

0
votes
0answers
5 views

Gravity Forms - let subscribers create and edit forms

Was wondering how to let subscribers create and edit forms such that each subscriber can only see and edit his forms. What I came up with so far: 1. In order for user to be able to create, edit and ...
0
votes
0answers
11 views

Multiple Authors on Single Post

Does anyone know how to assign multiple Users as authors of single individual posts (even single custom post types)? I want more than just displaying as tags the list of authors. I am looking at the ...
1
vote
1answer
24 views

How to get all capabilities of an existing user role

How can I get ALL the capabilities of an existing user role (eg. Author) ? I'll be using it to quickly duplicate an existing user role, then create a new role then assign or remove capabilities to a ...
-3
votes
0answers
12 views

Unable to publish post [on hold]

A fatal error occurred whilst a plugin I'm using was creating a custom post. Since that moment, no admins can publish posts - only submit for review! Admins can still perform all other tasks ...
-1
votes
0answers
11 views

get_user_level in Front End Only Users

I'm using a plugin called Front End Only Users and I would like to use php to get a user's level so I can conditionally show hide information in a custom page template. I know I can use shortcodes to ...
1
vote
2answers
43 views

How to safely allow user upload on CPTs?

I have a form with a WP Media to allow user uploads for a custom post type on the front end. Every time I try to upload as a user I can the message You don't have permission to attach files to this ...
4
votes
2answers
75 views

How to update user role without logout

I am working on a wordpress project with the following plugins : Woocommerce Woocommerce product vendors WP Job Manager Wp Job Manager products I am trying to upgrade the user role after adding a ...
0
votes
0answers
14 views

Custom post type shows all if no post from user

I'm trying to achieve this (without using any plugins): Adding custom post type Allow subscribers to create, edit, view their own posts "only" in wp-admin I'm using this code: ...
1
vote
0answers
15 views

Add custom capabilities to existing custom post type

The only way I can find to associate post types with custom capabilities is during the register_post_type function. I'm looking to add a capability for a certain role (my_role) for a post type that ...
0
votes
0answers
12 views

Temporary Test WordPress Multisite Instances

What I need is a solution to setup a way for clients to test a plugin, in the backend, on a demo wordpress installation. Something like a temporary testing instance (wordpress multisite subdomain). ...
0
votes
0answers
15 views

Problem with the standard example of media_handle_upload

I have been trying to make a custom tab for the media uploader to treat some files and looked for a way to do such a thing, and found an example of it in the media handle upload page. The code I used ...
0
votes
0answers
13 views

Custom Post Type - after disable 'Add New', I can't edit and delete post

I need to disable 'Add New' button for my CPT, but when I add: 'capabilities' => array( 'create_posts' => false, 'edit_posts' => true, 'edit_post' => true, 'delete_post' ...
1
vote
1answer
13 views

Adding an additional role to an Administrator

User 19 is a WP Admin. $user = new WP_user( 19 ); $user->add_role( 'custom_role' ); The above code works and adds the custom_role role. However, when I run the same code on the ...
0
votes
0answers
26 views

add a custom user role and assign specific admin menu pages

There is wordpress function add_role to add a custom user role by adding wordpress defined capabilities like read, edit_posts, delete_posts, etc But I want to create a custom user role and assign ...
0
votes
0answers
18 views

Assigning custom capabilities restricting CPT usage

I want to activate my plugin with 2 or more CPTs. Everything goes fine with 'capability_type'=>'post'. Now I want to incorporate custom capabilities to my CPTs and want to assign 'em to the admin ...
0
votes
0answers
24 views

Custom post type only works when role has edit_posts capability

I have been trying to create a custom post type 'book'. Added capabilities when registering custom post type. All works well except I have to give user the permission 'edit_posts' when accessing my ...
0
votes
1answer
43 views

Remove Custom Capability

I have created a custom post type 'book'. All book post-type are public, so I want to remove some capabilities such as 'delete_private_books', 'read_private_books' etc. How can I achieve this since ...
1
vote
1answer
30 views

You do not have sufficient permissions to access this page on a submenu

I'm writing my first plugin for WordPress and am running into a permission issue when trying to pass a parameter to a page. I've added a submenu page to process a delete for a category from the ...
0
votes
2answers
94 views

User role permissions based on taxonomies

I was wondering if it's possible to set up user roles in a way that means that users in certain groups can ONLY edit posts that have a specific taxonomy assigned to them e.g: Properties (Post Type) ...
0
votes
0answers
28 views

How to add a dynamic image as a widget in dashboard

I'm trying to add an image as a widget on the dashboard screen like this: This is an ads image, which will be seen only by users with read role and that too will be changed every month. Already I ...
0
votes
0answers
14 views

Disable edit certain pages for author

How can I restrict editors to edit some pages (ID) in my wordpress site? The author can see those pages but should hide edit option. I have tried this snippet but it does not work: function ...
1
vote
2answers
52 views

how we can get Users List by Role in WordPress

How we can get list of all users that are in wordpress by the role or capabilities. for example: Display all subscribers list in wordpress. Display all authors list in wordpress. Display all ...
0
votes
1answer
38 views

Redirect admin 403 “Cheatin uh?” admin pages

Blocking role capabilities on the admin returns the 403 "Cheatin Uh?" page. What is the best way to redirect this to 403 page to perhaps the dashboard, homepage, or a custom 403 page? I know I could ...
0
votes
1answer
24 views

What is more secure checking capabilities of user or checking role of user in WordPress plugin development

Suppose I need to check the logged in user is subscriber not anyone else. So if I check the capability like "read". Then subscriber is OK but "read" capability is also associated to admin/publisher as ...
-1
votes
1answer
66 views

Sync roles across several plugins

Here is the setup: I am implementing Wordpress with two specific plugins: Ultimate Members and Yith Vendors which is a woocommece addon. What I need to do is change a field's data in the database ...
1
vote
1answer
59 views

REST API: How can I restrict a custom post type to only be accessible by authenticated users?

I have a custom post type configured to be accessible via the WP Rest API v2. How do I lock the access to this custom post type so that only the authenticated users can perform GET requests?
1
vote
1answer
47 views

Custom role capabilities to administrator not taking effect (no plugin)

I have created a custom post type from a plugin. I added a capability type teacher. Then I have added custom capabilities to administrator. But the problem is for the first time after completing this ...
4
votes
2answers
139 views

Change capability type of post type registered by plugin

I'm using the plugin Custom CSS JS which registers it's own post type but the capability is assigned to "post". I want to change it to "manage_options". Is there a correct way without altering the ...
0
votes
0answers
16 views

Allow user to edit same category posts published by other user

Is it possible to allow user edit their own posts and also posts that are published in same category by other users?
0
votes
0answers
18 views

Creating a project management plugin, projects are only seen/managed by admin

I went to make a WordPress plugin to manage my projects. I don't want to make my projects as public, only I(super_admin) should be able to see/manage it. Here is what I need: Adding Client ( as CPT ...
0
votes
0answers
12 views

Remove QE options and edit link from the title for a custom status and based on capability without js

I'm trying to remove the quick edit option and the edit link on the title of the post in the admin post list. I'm trying to do that on user capability and a custom status. Basicly when a post have ...
0
votes
1answer
42 views

How to restrict author to only access one custom post type ?

My installed Wordpress have 4 custom post type and 1 default post type. Basically what i want is that the author can also access particular one custom post type. Author must not see other post types.
1
vote
0answers
22 views

Allow users to set a post author

I have a website owned by myself that allows people to submit work for us to publish. I have a team of staff who need to create posts..etc I have assigned users the author role which allows them to ...
0
votes
1answer
22 views

How to add a menu page for options in wordpress for user that has the role of vendor?

I want to add new options page ONLY for those users whose role is vendor. How can I do that? This is my current code. add_action('admin_menu', 'business_settings_menu'); function ...
1
vote
0answers
49 views

Cannot Create new Post within Custom Post Type

I have a custom post type registered and when registering I am using... if( !post_type_exists( 'email_template' ) ) { register_post_type( 'email_template', array( ...
0
votes
1answer
58 views

Force “submit for review” on update?

I'm trying to force all content to be submitted for review. That means that if a user updates an already published page, that the update would be pending until someone else approves it. I don't see ...
0
votes
1answer
26 views

Run only on plug-in activation instead of wp_head

I have below function on my plugin which adds more capabilities to current user. // Role setting for add media function wh_edit_roles(){ if ( current_user_can( 'edit_posts' ) ){ $user = ...
0
votes
0answers
28 views

what is 'capability_type' and 'capabilities' for 'register_post_type'?

My English sucks..I dont understand what the 'capability_type' and 'capabilities' do in 'register_post_type' after reading the codex.Is it for the admin or for the reader?and what exactly does those ...
0
votes
0answers
47 views

How to add 'Site Identity' capabilities to customisation for editors

I was able to give most capabilities to editors for the Customisation. However I'm lacking the Site Identity capability. I found this thread How to change in customizer the "site ...
0
votes
0answers
29 views

Custom role cannot upload media in new custom post page

Sorry if this question is duplicated. It seems to be similar to this question (Custom post type media upload error with custom user role) but I couldn't make it work. I have a custom role called ...
0
votes
1answer
37 views

Using media-upload.php - requires user to have edit_posts capability?

I'm integrating an image upload action, on the options page for my plugin. It works, but the thickbox dialog sits with a message "crunching" and never completes. Checking the console in Firebug ...
0
votes
1answer
38 views

Admin custom option screen not saved unless user manage_options capability

I am running into exactly the problem described by this Trac: https://core.trac.wordpress.org/ticket/14365 I see that one of the devs added a Diff here: ...
0
votes
2answers
42 views

Limit role to one plugin [duplicate]

Is there a way to do this without using another plugin and without modifying WP core code: I want to give the custom plugin I am writing a settings page. So I will need to add plugin capabilities to ...
0
votes
0answers
58 views

Custom user role capabilities for Custom Post Type

I've created a custom user role using WPFront User Role Editor to allow access to only one Custom Post Type (job_listing, job_listings). It works almost great, however, it's not displaying "All Job ...
0
votes
2answers
924 views

How to change in customizer the “site identity” tab required capabilities

I'm building a multisite in which site admins have no "manage options" capability. The problem is that withut this cap they cannot see the "site identity" tab in the customizer, where they can change ...
1
vote
0answers
45 views

Allow user to only access custom post type

I am starting to get comfortable with Custom Post Types, but I don´t get the capabilities for them right. I have something like this: // define capabilities... $capabilities_werden = array( ...
0
votes
0answers
34 views

user_has_cap filter crashes site when doing get_posts()

I can not understand why the site is crashing when adding this block of code: function demo_function( $capabilities ) { global $pagenow; if ( $pagenow != 'post-new.php' ) { ...
0
votes
1answer
36 views

Changing capability type without altering plugin

This is probably easy but if someone could help me that would be great: I'm planning on using the "Reusable Text Blocks" plugin on several Wordpress sites. I'm going to use this on sites that only ...
0
votes
1answer
73 views

Wp custom post custom capability not working togather

I am trying to make a custom post type editable by a group of people (i.e. The users department) instead of only the author. I don't want to let them edit posts created by people of other ...
4
votes
1answer
268 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 ...