The custom-roles tag has no wiki summary.
11
votes
4answers
8k views
How to change a user's role?
I have custom roles in my setup and I want to be able to automatically change a user's role thru a function. Say user A has a SUBSCRIBER role, how do I change it to EDITOR? When adding a role we just: ...
3
votes
1answer
417 views
Roles & capabilities GUI that does not create separate table
After reviewing plugins that deal with user roles and capabilities I concluded that I might be better off just hardcoding my settings into my functions.php file. This actually worked out well for me ...
3
votes
2answers
735 views
Associating an “author” with a custom taxonomy
I have a custom role, "Ministry Representative", which is able to log in and create and manage their own "Opportunities" and "Events", which is each a custom post type.
On the front end of the site, ...
3
votes
1answer
480 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 ...
3
votes
2answers
370 views
Why does my custom WP role need edit_posts to edit images?
This may be obvious to someone other than myself. I think I remember reading somewhere that an "image" is indeed a form of "post".
I have a custom post type called "listing"
I have a custom WP role ...
2
votes
3answers
2k views
Access on specific pages in wordpress for a specific user
My Question is regarding User access control in wordpress
I have two user - admin (admin access) and user1(editor). My requirement is admin can do any modification in admin site. But user1 can only ...
2
votes
3answers
640 views
Role that can edit only widgets, not other theme options
How could I make particular role access widgets administration menu (wp-admin/widgets.php), but not access other theme administration menu elements.
I have got that far as to display Appearance menu ...
2
votes
1answer
450 views
Prevent or Disable creating new users or changing roles of existing users to Administrator
I am trying to give more permissions to the editor role by giving it access to create user accounts. See the code below. But I would like to prevent it from creating or editing existing users with the ...
2
votes
3answers
384 views
Customize Admin Users Screen based on Role
I've added a role of "Customer" and I am working on customizing the Users Screen for that role. What I'd like to do is customize columns based on that particular role.
Note:
For example, take a ...
2
votes
1answer
41 views
Is there a way to localize role labels?
I'm using Justin Tadlock's Members plugin to create new roles and WP Role on Registration to display them on the registration form.
I've got a multilang site (English and Spanish) and I've localized ...
2
votes
1answer
207 views
Users roles, make a page belonging to multiple users
I have a website with a lot of users.
They are all editor (with same custom roles). They can add page and post, and edit only their own page/post.
But some users need the ability to edit some ...
2
votes
2answers
94 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 ...
1
vote
3answers
246 views
Using author_can() on custom post types in WordPress
I'm trying to conditionally display some content in a theme using custom roles and capabilities. First, I define a custom role:
add_role('free_vendor', 'Free Vendor Listing', array('read', ...
1
vote
2answers
609 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 ...
1
vote
1answer
151 views
Limit access to page depending on user level
I've been asked to build a WordPress that limits access to posts with a particular custom post type based on the logged in users level. There will be a number of pre made user roles and they would ...
1
vote
0answers
25 views
Purpose of Adding Capability to Role But Not Grant?
I am attempting to create a custom role upon activation of my plugin. Along with that role, I wanted to add new capability to that role to access later. Now, after reading the Codex, I am totally ...
1
vote
0answers
53 views
Filter Menu Items by Custom User Role in a page
I want to create a page template where the contents of the menu is filtered. Say, on Template 1, I want only the pages/post created by a custom access role areamanager1 to be displayed on the Menu on ...
1
vote
1answer
206 views
edit role display name and label name without plugins
I'am creating WordPress function for editing role name
function change_role_name($role_name, $new_role_name, $display_name) {
global $wp_roles;
if ( ! isset( $wp_roles ) )
$wp_roles ...
1
vote
1answer
186 views
How to check user role?
I have functions that have to execute based on the user roles. How do I check the user role so that I can insert the respective function under their role?
EG.
if ($_GET['role'] == "free member" ) ...
0
votes
1answer
82 views
How to set where user is redirected to after logging in at wp-login?
So i'm fairly certain this probably has something to do with the fact that I'm using a custom role I've set up in my functions.php file with almost 0 permissions. However, I'm still able to access ...
0
votes
2answers
578 views
reset the users roles - is there a way to do this?
any way would be acceptable for me,
even hacking the DB.
I have messed up the roles with MEMBERS plugin, and i need a way of reseting the roles somehow. i can't seem to find a proper way.
...
0
votes
1answer
384 views
How to order posts by custom WP role?
I currently have the following custom wp_query which displays posts from 2 custom WP roles, "custom_role_one" and "custom_role_two". It displays the posts from my custom post type of "listing". It ...
0
votes
1answer
88 views
How to add only a (sub) capacity to an user role?
I know I can add capabilities to the any role using the role object and add_cap via functions.php
<?php
// get the the role object
$editor = get_role('editor');
// add $cap capability to ...
0
votes
3answers
215 views
Check whether user can delete a given post
I have run into this problem where the following piece of code always returns true for any post ID supplied to it.
current_user_can('delete_posts', $post_id);
Normally, the above code should return ...
0
votes
2answers
258 views
How to hide plugin options for editors via functions.php
I've read the entry Best Collection of Code for your functions.php file, it really help me a lot.
I only got a question, is there a way to hide some plugins options (in their respective ...
0
votes
1answer
112 views
Removing capabilities from cloned admin role
I'm trying to create a new role within my wordpress theme that has almost all the same rights as an admin. Basically, it's a cross between Editor and Administrator. One of the issues I'm having is ...
0
votes
1answer
23 views
Roles and Capabilities in Custom Post Types
Is there a way to create one role with one capability and apply it to some of the custom post types?
What I am doing right now is ending up with applying capabilities to all of the posts..
creating ...
0
votes
0answers
21 views
Create new capability but restrict to specific page
I am using a custom upload box to allow a subscriber to upload their own avatar. currently the upload is failing as subscribers do not have media upload permissions.
I do not really want to enable ...
0
votes
0answers
25 views
How to make a plugin appear only to a certain role of user?
I'm using a plugin called "Team Result", to create team results and things like that. It appeared on the dashboard for admin(me). As you can see in this print ...
0
votes
0answers
58 views
Custom Theme Options page permission issue
I've created a custom theme options page for my theme. I've added the manage_options and edit_theme_options capabilities to the editor role and those are definitely working properly. I can save items ...
0
votes
0answers
40 views
pages not found for custom user role
I've created a custom user role for my clients to allow them to manage theme options, and all the other capabilities that the default admin has with the exception of several capabilities that would ...
0
votes
0answers
16 views
Allow Authors to add category in Multisite Inatllation [duplicate]
I am looking for a way, to allow authors, to add categories. Refering to this post: How would I increase the Author Role to be able to add a new category?
I tried this function:
function ...
0
votes
1answer
53 views
Custom role, capabilities, and post type: preview button wrecks things
I'm using the Members plugin to manage capabilities of a custom role that will only be able to edit/publish a custom post type that I created in my functions.php file. After much work, I got this ...
0
votes
0answers
40 views
How should I manage dual registration and custom roles on my wordpress site?
I am running a multi-lingual site for my client and now he wants to add in a shop and a community so I have to deal with shoppers and authors as logged in users.
Now I want only a single ...
0
votes
0answers
28 views
What capability is required to view posts, scheduled in the future, by someone else?
So, I'm trying to create a number of custom roles within my theme to meet with the custom requirements of the site.
The first, and most simple, being 'external viewer' who I want to simply be able to ...
0
votes
1answer
60 views
Custom post type & role issues
I am having issues with using custom post types and custom user roles. I created a custom post type called Businesses. Then I created capabilities for users of a certain type to be able to add and ...
0
votes
1answer
44 views
Best Roles and Capability on a site with review features using a front end custom post
I'm working on a Movie Blog site, I'll be having a movie review for site members and planning to create/install plugin that can create a front-end post/edit using a custom post type for that reviews. ...
0
votes
1answer
42 views
Custom role can't create permalink
My user post a new custom type "artprim_item" and it doesn't work unless I remove permalinks. The item is created, but the permalink links to "item not found".
More importantly, if I open the item ...
0
votes
1answer
83 views
empty dashboard for custom role
I setup a custom post type employee with an agent role that mimics an author role for this particular post type, and so far everything is working fine, except that when I created a test user and ...
-1
votes
1answer
68 views
One author not showing in Author drop down list while editing page
USER01 is not showing in Author drop down list while editing a Page if he's in the my custom ROLE "mycustomrole".
If I change his role as an AUTHOR, and add the very same custom and non custom ...
