Tagged Questions

Names for a set of user capabilities.

learn more… | top users | synonyms (1)

1
vote
3answers
812 views

Update User Role Across Network when Main Site User is Updated

I'm using a slightly modified copy of the Multi Site User Management plugin to keeps users synced across a multisite network, but have one problem with it. When a user's role is updated on the main ...
1
vote
2answers
709 views

How to allow a user to make their post (ad) a draft, and then publish again without needing approval?

I'm using WordPress as a directory site, where a user can submit a post, which becomes their ad/listing. The users are assigned a custom wordpress role. Posts need to need to be approved and ...
2
votes
2answers
1k views

wordpress custom login successful redirect hook

I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role. ...
3
votes
2answers
516 views

Can i copy administrator role to another user?

can i copy the role of administrator to another user and remove few capabilities not required ?. Basically, i want to have a user with restricted admin privileges.
1
vote
1answer
741 views

grant a privilege for roles (for example editors) and higher

My wordpress theme has a custom post-type. Only editors (and higher) should be allowed to use this post type. I did this with: function add_capability($role,$cap) { $role_obj = get_role($role); ...
0
votes
2answers
1k views

Some users getting a 404 when previewing draft posts/pages

I have a WP network and have found that users with roles other than "super user" (admins, editors, authors, etc.) are getting a 404 when trying to preview draft posts/pages/custom post types. Any ...
1
vote
3answers
228 views

How do I apply a class to custom menu items based on user roles

I have a members section on my site and they see specific custom menu items. I'm seeking a way to simply apply a star to the <li> based on it's permission level and what the user's role is. ...
0
votes
1answer
549 views

Show 10 latest posts only from users with contributors role

How to achive this in sidebar.List of 10 latest permalinks(post titles) from contributors ?
10
votes
3answers
6k 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?
2
votes
1answer
2k views

How do I remove dashboard access from specific user roles?

I'd like to prevent certain user roles from accessing the dashboard http://www.openeye.net/wp-admin/ at all. I've moved and restyled user profiles to a new page that's viewable on the site. How would ...
2
votes
1answer
587 views

How to programmatically add a user to a role?

I want to programmatically add the current user to a role and also remove the current user from a role in a php page i created . am really stuck. thanks in advance
0
votes
1answer
463 views

Show posts from specific roles

I'd like to use query_posts() to show only posts from editors and administrators on my home page so that normal authors can post on their own pages, but not affect the home page. Edit : Thanks for ...
0
votes
2answers
116 views

Hiding custom theme functionality using capabilities

have spent half an hour hunting around on Google to solve this so any ideas greatly appreciated! I'm using a bought theme running wp3.2 and the theme includes a few extra features Testimonials, ...
0
votes
1answer
296 views

user_can() not working for comment authors

I'm trying to do some capability checks on comment authors using the user_can() function, but for some reason it isn't working at all. I have a custom capability setup with the Role Manager plugin ...
0
votes
2answers
1k views

How do I redirect upon login a specific user based on role?

I'd like to force a user to a specific page upon login based on their role using if ( current_user_can('contributor') ) and the main login function function wp_loginout($redirect = '', $echo = ...
0
votes
1answer
699 views

Hide posts from users with a specific role

Simply put, I need to hide all posts on the frontend if they are written by authors with a specific role. The role I have created is called 'Suspended'. I'm happy with putting a simple IF statement ...
1
vote
1answer
2k 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 ...
1
vote
1answer
709 views

How to order posts in wp_query by the user role (2 roles in array)

I'm using the following code from this answer: How can I get the last posts by user role ? <?php $friends = get_users( array( 'role' => 'friends' ) ); $friend_ids = array(); foreach( $friends ...
0
votes
1answer
361 views

Building Forums with Custom Post Types

I'm trying to build some sort of a discussion boards by using custom post types and the built in comments. The structure is as following: An archive page to list all the pages of the Forum type, so ...
2
votes
1answer
359 views

how to assign more permission to wordpress author

I have installed jw player plugin so that users of my site could upload their videos. Right now, admin can only see jw player menu on the admin panel and he can only upload videos and use this plugin. ...
1
vote
1answer
850 views

Why does this check to see if user is authorized to edit a post fail for all but super admins?

I'm trying to determine if a piece of content can be edited by a user. I would like all roles contributor and above to be authorized by a single check. Here's my code: if( empty( $post_id ) || ...
3
votes
2answers
621 views

User roles - enable custom posts disable posts

Im just wondering if its possible to create user role that allows to write/edit custom post type for example: Consultants, but not allow to write normal posts (used for as news for example). I know ...
2
votes
3answers
895 views

Allow unfiltered HTML in titles for low level users?

How can the unfiltered_html capability be given to non network admins in a multisite install to allow HTML in titles? In wp-includes/capabilities.php (below) it appears that this capability can not ...
1
vote
1answer
392 views

Enable comments for post with comments meta box removed

I have created a custom post type in a plugin for a site I'm working on. I'm allowing users assigned a custom role to add/edit/delete the custom post type. I would like to give these users as little ...
2
votes
1answer
229 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
1answer
518 views

The delete_posts capability?

Shouldn't this remove the capability to delete a post? Even if I remove the delete_posts capability for an editor, he still can trash a post and then delete i permanently. That can't be right. How do ...
1
vote
1answer
683 views

Prevent authors from creating new posts of specific custom-post-type

The way I'm set up currently, I create a post for each user of the site, custom-post-type, Agent, then assign it to a user, and they can edit it however they like. What I want to remove or disable is ...
0
votes
1answer
30 views

Plugin Hook When New Author Added

Is there a way to add a hook for a plugin when a new author is added by the administrator? I would like to be able to add that user to my plugin database table. Thank you.
0
votes
2answers
991 views

Expanding the allowed HTML tags in comments?

I have no problem doing this in a comment, as an administrator: <b>bold test</b> <i>italics test</i> <u>underline test</u> <font color="#ff9900"> color ...
1
vote
2answers
749 views

How to show a admin bar menu item only to users with certain capabilities?

I'm trying to add items to the admin bar but only for users with certain capabilities, such as add_movies in a plugin. The problem is that, according to @toscho and @TheDeadMedic, the plugin executes ...
2
votes
1answer
572 views

How do I properly format the user_role array?

I used a role editor recently and needed to delete a role. After deleting it I noticed that it began to appear as blank in the edit user role drop-down. After a bit of investigating and deleting ...
11
votes
4answers
3k views

Site admin in a network install can't edit users?

For the Stack Exchange Community Blogs, we have a network install that we've set up. I am being told that the site administrator role is not allowing an option for user editing. On the site's users ...
1
vote
3answers
1k views

Saving custom profile fields

I'm adding a custom profile field to users of a specific role, like this : function add_custom_profile_fields( $fields ) { // get current user ID $user = new WP_User( $_GET['user_id'] ); ...
3
votes
3answers
2k views

How to let contributors to create a new revision(draft) editing their published posts

I'm using a custom post type to let contributors have a personal page on the site. Any time a user registers to my site a script creates a custom type post that has the registering user as author. To ...
1
vote
1answer
1k views

Define new user capability for custom post types?

If I create a custom post type and want to create custom capabilities for that, how do I do this? For example, I want to let my Editors to edit and create and delete posts and pages, but not the ...
5
votes
1answer
3k views

Change Author Base Slug for different Roles

is it possible to change the author base slug in dependency of the role? For example, authors get example.com/ninja/%username% and subscribers get example.com/trainee/%username% ? I am thinking of ...
0
votes
2answers
403 views

How do I “trash” a custom post type post while logged in as Admin

I am using the members plugin and have a custom post type of "listing" When I navigate to listings in the backend, I can edit. quickedit, and view. There is no option to trash. I am logged in as ...
3
votes
1answer
1k views

Roles at registration (classipress)

I have a classipress site and want to have the user choose upon registering with the site if they are a teacher, or student. These will be different roles. I have been trying to get roles at ...
4
votes
4answers
1k views

How do I allow a specific Role in Wordpress 3+ to only see certain plugins?

I am familiar with user roles and how to change them within Wordpress 3+, My problem is when I disable a user from being able to view plugins, all plugins are disabled from view. How do I let them see ...
0
votes
1answer
593 views

Paypal API and Wordpress

Hi does anybody know where i can find a PayPal API tutorial that can help to point me in the right direction, What im needing is something that when payment is verified by paypal it bounces through ...
6
votes
2answers
8k views

Separate registration and login for different roles

I've set 2 new roles for my site using the "Members" plugin - "sellers" and "buyers". Each role should have its own registration page and login. A visitor can register as both a buyer and a seller ...
1
vote
3answers
2k views

Code needed to only show users own posts in a multi-user account

I am using WP3 and want to starting adding users (many users to a single blog) but when I give a new user an account, they can see all the posts in the admin including scheduled, drafts, pending ...
0
votes
1answer
1k views

Menu page with minimum capability as 'Subscriber' doesn't allow 'Admin' to access it?

I've added a separate menu page (an object page) with minimum access level required as 'Subscriber'. I'm doing this because I'm registering new users and they'll be 'Subscribers' with an extra ...
0
votes
1answer
781 views

How can I get the last posts by user role?

I have a custom post type ("News"), and a custum user role ("Friends"). How can I get the last "News" written by "Friends" ?
0
votes
2answers
2k views

User capability of create page/new page

I am working with the Role and Capabilities API for the first time today and making use of the the excellent Members plugin. Having tinkered around for some time I notice that the "edit pages" ...
9
votes
3answers
16k views

Allow member to have access to custom post type only. Permission to only edit their own posts

OK I'm looking for the best way to attack this. I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress. Here is what I'm looking at doing: User registers ...
2
votes
5answers
396 views

How to add another user to this remove_menu function?

Pretty self-explanatory. How does one add another user to this function for functions.php, i.e., user2, who will be shown different menu items than user1? I tried adding another ...
1
vote
3answers
231 views

User Roles Not Sticking

I have added a custom user role of super_poster, basically they make 20 posts and once they hit $postlimit get auto-moved back down to contributer level, the moving down and post counting works ok, my ...
2
votes
7answers
8k views

Display navigation menu item conditionally based on user capabilities

I have one "branch" of my main site's navigation tree that should only be accessible to a set of registered, logged-in users. I understand how to query a user's role and capabilities. This question is ...
3
votes
1answer
476 views

Return ID of authors who have at least one post

I found a great piece of code here that returns the ID's of users by role. What I would like to do is modify it so it only returns the ID's of the users who have at least one post. I have tried to ...