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.

Filter by
Sorted by
Tagged with
0
votes
2answers
132 views

Cannot access wp-admin after installing SSL - user capabilities not being set

EDIT: Turns out the solution was to simply re-install wordpress (it was a new blog anyways). Still not sure what the issue really was but that solved it. I have tried every single fix on ...
0
votes
0answers
25 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 ...
0
votes
2answers
600 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
28 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
49 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 ...
9
votes
5answers
2k views

Allow Contributor to change the author of his own post?

Is it possible to let a contributor change the author of his own posts? I realize this will effectively lock them out of the post, that's what i want. I want them to be able to change the author once ...
1
vote
1answer
2k views

Permit users with author role to edit a custom post type

I have this already coded project which has a custom post type with a certain behavior: it is only a single post and admins/editors/authors can only edit its content. it's content is a custom data ...
1
vote
1answer
36 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' =>...
1
vote
4answers
390 views

Admin cannot publish

When I logged in on my site this morning I noticed that my user can’t publish anything. I am administrator and the only user on the site. On Posts and Pages instead of “Publish” I have the “Submit ...
1
vote
0answers
256 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 ...
0
votes
1answer
85 views

Not able to post data through wp-admin

I have a wordpress site wordpress version is "3.8.26". My php version is 7. when am adding new post to my site its not displaying "publish button" its showing "Submit for review". button And ...
1
vote
0answers
33 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 ...
0
votes
1answer
80 views

How can I prevent certain custom roles from seeing other custom roles on the user list page?

So I am building a system with 3 different custom roles - Admins, Providers, and Users. Providers have access to users.php, or the list users page. However, they should not be able to see/edit/access ...
1
vote
1answer
5k views

add_menu_page() for more than one user role

If I add a custom page to the wordpress backend menu via add_menu_page('My Custom Page', 'My Custom page', 'editor', 'custom_page','add_custom_page','dashicons-admin-comments',8); only a user with ...
1
vote
0answers
118 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 ...
0
votes
0answers
31 views

How to add capabilities for editor type user to access admin section

How to add capabilities for editor type of the user. After login from admin side editor type of the user can access certain woocommerce product from admin dashboard. Only user can see some assign ...
0
votes
1answer
231 views

Wordpress allow access only one custom post type “xyz” to custom user role but need to hide all admin panels

I have Wordpress website and has some user roles and I want to show related admin panels for their roles. I have checked few user role plugins but not found any solution. basically, We need to set ...
0
votes
1answer
158 views

WooThemes - Vendors / Bookings - Allow Vendors to manage resources

I am trying to bring new capabilities to the bookings plugin from WooThemes. While combining the bookings and the vendors plugins, vendor users aren't allowed to manage resources (resources are a ...
0
votes
1answer
569 views

edit_page or edit-pages for current_user_can()?

The more I read Wordpress Codex the more often I wonder if tutorials you can find on the net are actually correct. I've found several tutorials about creating metaboxes where user capabilities (when ...
9
votes
4answers
1k 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. ...
0
votes
2answers
561 views

Allow contributor to view own scheduled post

As an admin, I can preview scheduled posts. In the post listing, there's a "preview" link which appears if you hover over the scheduled post title. As a contributor, I can preview a post if it is in ...
0
votes
1answer
498 views

Can I Create a Second Admin Level User Role?

I want to create a second User Role, which has the same priveleges like a Admin User Role. This way I can use the Adminimize plugin to disable some features there. I'm trying to have a User Account ...
2
votes
1answer
3k views

How to check if a role has a specific capability

In a plugin, i create a dedicated user role along with some capabilities. These capabilities also need to be assigned to other roles, such as editor and admin. As the addition of roles and ...
3
votes
2answers
1k views

how to add custom user capabilities using add_user_meta or something else?

i have two WordPress sites with SSO Configurations as described here but the plugin in the answer didn't work for me so i tried to write a code to add capabilities for second site users: $...
3
votes
1answer
1k views

Prevent user creating new users with specific roles

On a multisite installation I have created some custom roles. Some of them have the capabilities to create new users. I want to allow users to create new users only with allowed roles. One step is ...
2
votes
1answer
443 views

\WP_User Object | What's the Difference Between {caps} and {allcaps}?

Upon dumping the \WP_User object, I've noticed that there are two properties, which are directly related to capabilities for a particular user. $user_object->caps $user_object->allcaps I've ...
1
vote
1answer
720 views

Update User Role

I'm developing an plugin that adds an new user role (client role, for instance). This role only extends the admin role for now. add_role( 'client', __('Client'), get_role('administrator')-...
2
votes
1answer
232 views

Allow user to edit specific user with meta key using map_meta_cap

Is there a way "hook" or custom code to allow user with custom role "abc" to edit and remove another users with custom role "xyz" by using map_meta_cap ? Thanks
0
votes
1answer
41 views

The Capability to choose post/page template

I have created a role in wordpress with add_role( string $role, string $display_name, array $capabilities = array() ) function I want to know witch Capability from the array of $capabilities will give ...
2
votes
0answers
399 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 ...
2
votes
3answers
3k views

How to update role capabilities

I have manually created a role called "event-planner". I've assigned some capabilities to it and it works as expected. However, if I later set one of the capabilities from true to false (or viceversa),...
1
vote
0answers
95 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 ...
1
vote
1answer
138 views

How to remove sticky post capability for a specific user role?

All is in the title. Does someone know a way to do that ? Thanks !
0
votes
1answer
916 views

Removing add new pages form editor role

Hi I have set up multisite and I am the super admin. I want to remove the capabilities of "Editors" to add new pages. I made this change to my theme function, which removed what I want it too, ...
0
votes
1answer
204 views

How to use gettext for specific user role

I am trying to replace the publish button text to Submit for review only for specific user role. But I can't find anything which can specify current user role and apply the filter. Here's my code, it'...
2
votes
1answer
4k views

Custom role based users are not able to access wp-admin

First of all I am a WordPress learner. So sorry if my code looks stupid! I have created a custom theme with a custom user role. I am not developing any plugin. In my fucntions.php file I have ...
0
votes
1answer
483 views

Capabilities not working with custom post type

I have created a custom post type called Alerts. I want Editor users to be able to have full permissions to publish and edit alerts. I copied all of the capabilities of an administrator to satisfy ...
1
vote
2answers
41 views

Can you set a role as author?

I'm fairly new to WordPress and I'm trying to figure out how to best set up permissions. I want to restrict groups of people to only edit certain pages (IT department to only edit IT pages, HR ...
1
vote
1answer
1k views

Cannot attach media when capabilities added to custom post type

I have a custom post type we have had active for a few months now and managed with the wordpress admin user. We decided to implement different levels of "vendor" with various fields available to them ...
2
votes
3answers
3k views

How to get all users with Author role capabilities?

I need to fetch the list of all users who are Authors (with Author capabilities) get_users allows to fetch users with roles, but if users are filter with author role, it skips users with role admin ...
0
votes
2answers
589 views

Allow editors to switch sites (Multisite)

I have a multisite setup - 2 sites for the same company. Because the sites are for the same company they both share several users with the role 'Editor'. Is there a way to allow these users to switch ...
0
votes
1answer
28 views

How can I create multiple different admin roles with their own capabilities

I would like to create multiple Admin roles to manage only particular custom-post types that I assign to them. They would not be able to add/edit/delete custom-posts that they don't have rights to. ...
0
votes
1answer
662 views

How to set custom capabilities for custom taxonomies?

I am trying to set some custom capabilities for a custom taxonomy. I am trying the following: 'capabilities' => array( 'manage_terms' => 'manage_'.$types, 'edit_terms' => 'edit_'.$...
1
vote
1answer
74 views

Allow Author on Site A capability to upload files on Site B in Multi Site

I have a multisite. In Site A, a user is logged in as author. In Site B, user is still logged without role, but he can't upload file in a front end form (made in ACF). I need that user only logged ...
0
votes
1answer
61 views

How to handle this specific case of custom post type?

I'm working on a WP plugin called WP SoundSystem. It's a plugin designed to run on a "music" website : it handles artists, tracks, albums, playlists... through custom post types and tools. You can ...
1
vote
0answers
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 ...
0
votes
1answer
161 views

Capability to edit post slugs

I have a custom role that is allowed to publish articles (the only role allowed to publish). Everything works as expected except that the role cannot edit slugs. It can press 'edit', type anything, ...
0
votes
1answer
43 views

Capibilities of CPT WordPress

i create a 3 different custom post type and i need, on backend, this is ablet to edit only by administrator user role and my custom user role (mmv_multi_vendor). I set capibilities on code but i ...
0
votes
0answers
736 views

Groups roles & capabilities

OK here's the situation I need to play with I have a business with multiple departments. Within those departments, there will be multiple users each with individual logins. Each department should ...
0
votes
0answers
1k views

How can I remove “Add new” button on custom post type

I would like to hide the "add new" button from my custom post type. I tried doing this : (from this answer) 'capability_type' => array('place', 'places'), 'capabilities' => array( ...

1 2
3
4 5
10