Skip to main content

Questions tagged [capabilities]

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.

159 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
271 views

Custom post type capabilities require "create_posts" to access the edit posts list page

I have a custom post type and a custom user role that I want to be able to do everything but delete and create this post type. However, this user role can't view the dashboard's list of posts for ...
Zach Wat's user avatar
4 votes
2 answers
2k views

Do not allow users to create new posts and pages

I'm defining a new user role called Proofreader and as the name says, users of this group should be able to read and also edit the posts and pages. But I do not want them to create new ones. With my ...
Sam's user avatar
  • 435
3 votes
0 answers
15 views

Add/remove capability for blocks theme nav menu

I'm building a wp blocks theme for in-house websites with controlled branding. This theme will be rolled out to hundreds of websites. I want to create a second level administrator role and remove ...
Net Iconic's user avatar
3 votes
0 answers
62 views

Locking Down Wordpress Application Password Permissions / Capabilities

I am working on a Wordpress installation where we recently decoupled the frontend into a NextJS application that is no longer hosted on the same domain as the admin. We are accessing data etc through ...
some weird rando's user avatar
3 votes
0 answers
232 views

How can I control multiple editing of wordpress posts?

I am managing multiple authors blog, I have issues of editors taking over the stories that someone else is currently editing. The default wordpress warning will display but some of them ignore it and ...
Engr IBM's user avatar
3 votes
1 answer
2k views

Author Role - Allow editing of Gallery images

Is it possible to give the 'Author' role the capability of editing image titles and captions on post's they have created ? I have a number of users set to 'Author' , but when i've tested it's not ...
andytc's user avatar
  • 31
2 votes
1 answer
42 views

Why do comment moderators need to have all create/edit/delete toboth posts and pages?

I struggled quitea bit to be able to set up my moderator account. Until I allowed all posts and pages capabilities and now the can finally moderate comments. I didn't deactivate one by one precisely ...
Goma's user avatar
  • 29
2 votes
0 answers
67 views

In MultiSite, can some users automatically have Site Admin rights on all sites, without granting them Network Admin access?

We have some "content specialists" that we'd like to effectively grant Site Admin access to every site on our network automatically, but still don't want them to be able to access the network admin ...
MadtownLems's user avatar
2 votes
0 answers
740 views

Notice: Undefined property: stdClass::$delete_posts with custom post type

I created a custom post type called gdpr_qao and I set 'capability_type' => array( 'gdpr_qao', 'gdpr_qsaos' ) in register_post_type arguments. On main custom post type screen I get: Notice: ...
user avatar
2 votes
1 answer
551 views

read_post meta capability for anonymous users

read_post is a meta capability that can be used to check if a user can read a post. It can be used, for example, like this: if ( current_user_can('read_post', $post_ID) ) { // do something } No ...
Leo Germani's user avatar
2 votes
0 answers
419 views

Custom Role for CPT Only

I have removed admin specific capabilities for the custom role however they can still delete admin published listings. I only want people with the custom role of submit_listing to be able to submit ...
Brad Dalton's user avatar
  • 6,937
2 votes
0 answers
161 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 ...
davidmnoll's user avatar
2 votes
0 answers
83 views

How to restrict access to specific pages on the back-end?

Before anything... I understand how roles and capabilities work. And there are tons of plugins that help you manage those. Roles and capabilities can only be so specific though. Is there "wordpress ...
gdaniel's user avatar
  • 3,271
2 votes
1 answer
94 views

Users with custom roles can't read each other's comments

My site has a custom role ("coach") with its own set of capabilities (via map_meta_cap along with a few built-in roles). Each user is assigned a page on the site that they "own" and can edit (via a ...
Chris Van Patten's user avatar
2 votes
2 answers
138 views

Unify the roles and caps?

I installed several plugins(buddypress-docs,achievement,bbpress), each one create capabilities for their own post_type. I would prefer to make all roles and capabilities unified into one system, Is ...
Jenny's user avatar
  • 1,767
2 votes
1 answer
1k views

Allow contributors to moderate comments comments on posts they write

I run a multi-author wordpress site where we have a large number of contributors that can write articles, which are published after they are reviewed by an editor. (This is all standard wordpress ...
ScruffyDan's user avatar
1 vote
0 answers
31 views

Only allow users (that are not admins) to edit a specific post

I am using a ACF field on the user profile.php to assign a post id to a user. The users need to be able to receive the capability to edit this post, but only this post. They should not be allowed to ...
Klein's user avatar
  • 11
1 vote
0 answers
14 views

Easiest way to create Reviewer Role: Can preview Drafts (and Private Pages) but not Edit them

This seems a bit of a hole in Wordpress Roles. I have a site with many cooks (Editors). I would like to give some of them read-only access to Draft and Private materials. This post goes a little way; ...
Chris Pink's user avatar
1 vote
0 answers
117 views

How can I get all capabilities for a particular user?

I am trying to get an array of all caps for a given user. But the method get_role_caps() only returns the custom capabilities assigned to the user. The array does not contain the caps from the default ...
Elkrat's user avatar
  • 138
1 vote
1 answer
72 views

Add, edit specific CPT with custom role

Who can help me with roles and capabilities? I am stuck on this and I need some help. I want a role that only can add, remove edit etc. a specific CPT. What I have so far add_action('init', function(){...
Ben's user avatar
  • 13
1 vote
1 answer
539 views

Remove Capabilities from WP admin for specific user role

I am trying to remove some menu-links capabilities from the wp-admin for a user role called wsm. I have tried many ways and when i just add the code below it will remove those links from the menu for ...
Marc Tzjacker's user avatar
1 vote
0 answers
448 views

Custom post types as sub menu pages and role capabilities issue

I'm working on this: Create a menu entry in the admin panel name "Products" Have a dozen of custom post types, all as submenus items of my admin menu "Products" entry Allow a role ...
Bardyl's user avatar
  • 111
1 vote
1 answer
319 views

Adding all custom capabilities to admin

When adding a custom post type using the "capability_type" argument, custom capabilities are automatically generated for the post type. https://developer.wordpress.org/reference/functions/...
user2806026's user avatar
1 vote
0 answers
37 views

Add menu items/actions for multisite users who are registered on the network but do not have a role or capability in any sites

We've built a custom application (Pressbooks) that sits on top of WordPress multisite and transforms the multisite into a CMS for book publishing. A frequent flow for super admins is to invite a new ...
Steel Wagstaff's user avatar
1 vote
0 answers
76 views

My subscriber has the "edit comment" capability but can't edit comment

When i use the wp_get_current_user function to display all informations about my user (subscriber), it shows that i can edit comment : I tried to display an edit comment button next to each comment ...
PrescilliaDSD's user avatar
1 vote
0 answers
176 views

Adding user capabilities for a custom taxonomy of a custom post type for a custom user

I have a custom user role I've set up that has access only to 1 specific custom post type and nothing else ( no access to post, pages etc. ). I've got it working however I can't seem to figure out how ...
R. Brenchley's user avatar
1 vote
2 answers
680 views

Show metabox for a special role

I have special roles on my site. I use easy digital download. My user has access to the download page. I want the metabox not to see the number of sales. Can I hide this metabox for this role or user? ...
ma ja's user avatar
  • 125
1 vote
0 answers
15 views

How to set individual capability of post type in individual category

I need to add a new post type "Story". Each of my users I will give them an individual role to edit/view their own "Story"(One user one role). User Role only gives ability to limit capabilities based ...
Alex Chen's user avatar
1 vote
1 answer
39 views

Giving permission to anyone (non-users as well) with a password to edit a post, possible?

I would like to make possible to any visitors (non-users) to create a custom post from the WP frontend, then get a password in email which can let him/her edit the post if the proper password is given....
Viktor Borítás's user avatar
1 vote
0 answers
463 views

Why is unfiltered_upload not working despite being enabled?

According to the Codex, all that's needed to enable the unfiltered_ upload capability - i.e. the ability to upload any filetypes to the Media Library rather than just the default whitelisted ones - is ...
Hashim Aziz's user avatar
1 vote
0 answers
580 views

User Role Capabilities for WordPress Gutenberg Blocks

As I am switching from ACF to Gutenberg, I am looking for a possibilty to set specific capabilities for my users. In my common projects, my clients and content managers usually have "Editor"-Accounts ...
Arne Spremberg's user avatar
1 vote
2 answers
602 views

Remove upload file types filter for admin

Does anyone know if there is a function to remove/bypass file types uploads filter (specifically for admins). I know there are plugins available but they often break or don't contain ALL the mime ...
dkangy's user avatar
  • 11
1 vote
0 answers
114 views

WooCommerce Customer Role Delete Custom Post Type

WooCommerce customers are creating custom posts using Gravity Forms and then the customer is assigned as the author of the post. The custom post type is set up using the CPT UI plugin. I have this bit ...
philipatnedi's user avatar
1 vote
0 answers
798 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 ...
Chris Arnold's user avatar
1 vote
0 answers
591 views

Best practices to assert current_user_can() with guests

In WordPress, a guest can do a lot of things, such as reading posts. However, this always returns false for guests: add_action('wp', function() { global $post; /** @var WP_Post_Type $pto */ ...
Lucas Bustamante's user avatar
1 vote
1 answer
73 views

Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?

I'm encountering funny behaviour with a custom post of mine that I'm working with in a plugin of mine. Here are the arguments of the custom post: array( 'label' => [omitted], 'labels' =>...
John Doe's user avatar
  • 287
1 vote
0 answers
468 views

Subsite access without being a member of the subsite in wp multisite network

How can a user access a subsite without being the member of that subsite in a wp multisite network? What I understand is that a user can not access a private post in a subsite if he is not the ...
bakar's user avatar
  • 101
1 vote
0 answers
41 views

How can I add a custom role capability to use in a custom plugin?

I need to add custom capabilities to user roles, something along the lines of: $role->add_cap('xtc5000'); // 5000 can be different I need to use the 5000 value in another plugin for some specific ...
Ciprian's user avatar
  • 883
1 vote
0 answers
153 views

bbPress plugin moderator roles

I want to add an override to the existing role of a bbPress moderator. I need: super admin assign forum to moderator and moderator access only that plugin. one forum to have multiple moderators one ...
sehjad ansari's user avatar
1 vote
0 answers
202 views

upload_files cap to not loggen in users - add_cap to not logged in users

When not logged in users upload files to the media endpoint, the return message is: "Sorry, you are not allowed to create posts as this user." I would like to allow not logged in users to be able to ...
BenB's user avatar
  • 795
1 vote
0 answers
3k views

Sorry, you are not allowed to access this page

I have a big problem for a week I try to login in WordPress as administrator and I get a blank screen with this message "Sorry, you are not allowed to access this page". I have created a new admin ...
Cris's user avatar
  • 11
1 vote
0 answers
59 views

Allowing user to edit posts based on the post status

I have Edit Flow and User Role Editor installed on my news site and I basically wanted to do a system where editors pitch ides worth writing about to contributors. So I would want my contributors to ...
Martin's user avatar
  • 11
1 vote
0 answers
403 views

add_cap not working

Need to add a cap for the role editor, to grant them acess to a sub menu, but for some reason its not working. This is the sub-menu: public function submenu_apps_init() { $news_push = new ...
user114831's user avatar
1 vote
1 answer
63 views

Add capabilities via plugin for another plugin

I have a plugin I made and I need to add some capabilities for GravityView to the subscriber role in it in certain circumstances. I was trying to use user_has_cap filter to get it to work, and it ...
thatryan's user avatar
  • 433
1 vote
0 answers
156 views

Role capability issue

I have a custom sub menu item that has been setup for a long time and all of a sudden today one Role cannot see the item on the Tools menu. They can see a couple of other items on that same Tools menu ...
Robert Fitzpatrick's user avatar
1 vote
1 answer
244 views

Disable user from updating certain posts

I have a custom post type with a certain amount of posts. What I have to do is to disable users from editing/updating certain posts of that post type, but not all of them. I have to do that ...
dodo254's user avatar
  • 161
1 vote
0 answers
35 views

Custom capabilities to add, edit, remove users of a particular role only?

How to enable users of a particular role, called for example staff, to add, edit and even delete users - but of another particular role (here: clients) only? So far, when I add add_users, edit_users, ...
Bunjip's user avatar
  • 371
1 vote
0 answers
135 views

"Submit for review" for updates on existing posts

My custom user group for proofreaders has access to all our posts and pages but can't create or publish new ones. I also want disallow them to publish their changes. As far as I know, Wordpress has ...
Sam's user avatar
  • 435
1 vote
0 answers
141 views

Access to CPT but not to 'post' post type

I have two custom post types for specific posts and I also use the built in post types. For one of my custom user roles I want to restrict the access to the two CPT only. But I am unable to do this. ...
Sam's user avatar
  • 435
1 vote
1 answer
4k views

Disable `create_post` for built-in post type

I have some custom user roles for proofreaders which do not have the capability to create posts of my custom post types. Unfortunately I am unable to find out how to remove that capability for the ...
Sam's user avatar
  • 435