Assign your clients the “Editor” role in WordPress, but give them capability to act like an administrator, without letting them screw up your Pages. This example lets the Editor add and delete users, but stops them from editing the Pages you created for them. In addition, this example gives Authors the capability to create their own categories, in case your client (the ‘Editor’) wants to delegate some responsibility for posting to an ‘Author’.
$edit_editor = get_role('editor'); $edit_editor->add_cap('list_users'); $edit_editor->add_cap('add_users'); $edit_editor->add_cap('delete_users'); $edit_editor->remove_cap('delete_others_pages'); $edit_editor->remove_cap('edit_others_pages'); $edit_author = get_role('author'); $edit_author->add_cap('manage_categories');
Scott Grodberg
September 27th, 2012 at 5:42 pm
Thank you for the helpful writeup. I am going to borrow some of your code (other article) for removing WP menu items for different capabilities. Just wish there was a was to do it on a Role basis without a plugin. Oh well. Anyways, were you able to have your Editors administrate users? I haven’t been able to get that to work
Regards,
Scott
Isabel
October 2nd, 2012 at 9:57 am
Thank you. Yes, see Let Editor Manage Users in WordPress. Sorry for the delayed response. Hope this helps.