WP Moderator Question

James2

Elite Member
Joined
Jun 3, 2011
Messages
1,735
Reaction score
1,281
Hey guys,

I have looked on line of course, but can't find anything on this bar a few out of date plugins.

My question is: How do I give subscribers moderator powers without making them admins, thus giving them too much access to the web site's Dashboard. I just want them to be able to publish content and ban spammers/trolls?

I'm using BBpress (I'm able to asign users to moderators on the forum section, just not site wide) and Buddypress on the web site.

Thanks in advance for your time and help,

James :)
 
Excuse the bump guys. I think I posted when most of you were in bed.
 
From the Wordpress dashboard, you can navigate to the Users tab. Wordpress by default allows you to manually assign roles to each user. The editor role sounds exactly what you are looking for.

Admin - Full access.
Editor - Access to everything except themes, plugins, or widgets.
Author - Can publish, edit and delete their own posts. Cant edit or create pages. Can upload to media library.
Contributor - Same as Author except posts made by a contributor must be approved by editor or admin. Cant upload to media library.
Subscriber - Regular user.
 
From the Wordpress dashboard, you can navigate to the Users tab. Wordpress by default allows you to manually assign roles to each user. The editor role sounds exactly what you are looking for.

Admin - Full access.
Editor - Access to everything except themes, plugins, or widgets.
Author - Can publish, edit and delete their own posts. Cant edit or create pages. Can upload to media library.
Contributor - Same as Author except posts made by a contributor must be approved by editor or admin. Cant upload to media library.
Subscriber - Regular user.

Hey riz a. I do know this, but what I want is for my mods to be able to ban people without me giving them admin access.
Thanks for your help though. I appreciate it.

James :)
 
You will need to create a custom role for this James. It's pretty easy to implement but does involve adding some code to your theme's functions.php. I haven't tested the code below but it should work. I'm also assuming that by "ban people" you mean remove users.

Just copy and paste the below code into your theme's functions.php file. It's essentially the editor but with the ability to remove users. You can change anything marked true to false to disable individual privileges.


PHP:
// Add a custom user role

$result = add_role( 'moderator', __(

'moderator' ),

array(

'read' => true, // true allows this capability
'edit_posts' => true, // Allows user to edit their own posts
'edit_pages' => true, // Allows user to edit pages
'edit_others_posts' => true, // Allows user to edit others posts not just their own
'create_posts' => true, // Allows user to create new posts
'manage_categories' => true, // Allows user to manage post categories
'publish_posts' => true, // Allows the user to publish, otherwise posts stays in draft mode
'remove_users' => true, // Allows the custom role to remove users
'edit_themes' => false, // false denies this capability. User can’t edit your theme
'install_plugins' => false, // User cant add new plugins
'update_plugin' => false, // User can’t update any plugins
'update_core' => false // user cant perform core updates

)
);
 
Last edited:
Hey riz a.

Thank you so much. I'll try the code first as you went to the trouble of writing it and let you know how it worked out.

Best of luck to you mate,

James :)
 
Oh and good find with the plugin. I searched G, but couldn't find that one, just ones that hadn't been updated for over 2 years.

Thanks again for your help.
 
Back
Top