How do I increase Author Role permissions to be able to add Categories?
Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The easiest way is to use a plugin like Capability Manager or User Role Editor
Method 2
Should work from inside your functions.php
function add_manage_cat_to_author_role()
{
if ( ! current_user_can( 'author' ) )
return;
// here you should check if the role already has_cap already and if so, abort/return;
if ( current_user_can( 'author' ) )
{
$GLOBALS['wp_roles']->add_cap( 'author','manage_categories' );
}
}
add_action( 'admin_init', 'add_manage_cat_to_author_role', 10, 0 );
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0