I need to apply for custom access for the WordPress Author role. I used the $role->add_cap()
function in function.php and I need to get access to a specific plugin page Under the "Tools" section (To Redirection plugin).
If I used, $role->remove_cap('manage_options');
it gives access to the whole section Tools and Settings. But need to get access only to the "Tools => Redirection" page. Any idea..?
function add_theme_caps() {
$role = get_role( 'author' );
$role->add_cap( 'edit_published_posts' );
$role->add_cap( 'edit_others_posts' );
$role->add_cap( 'edit_published_pages' );
$role->add_cap( 'edit_others_pages' );
$role->remove_cap( 'manage_options' );
}