Change WordPress user roles and capabilities › Forums › How to or FAQ › How to give access to Redirections plugin › Reply To: How to give access to Redirections plugin
09/12/2017 at 04:06
#4490
Vladimir
Keymaster
You granted access to ‘redirect’ custom post type but not to ‘Tools->Redirection’ menu.
Bad news: Redirection plugin protect this menu item with ‘administrator’ role by default.
Good news: It allows to developer to change this default value to your own using custom filter, like this:
add_filter('redirection_role', 'change_redirection_permissions', 10, 1 );
function change_redirection_permissions($cap) {
$cap = 'manage_options';
return $cap;
}
Then any role with ‘manage_options’ capability will can access ‘Tools->Redirection’ menu item. You can install this code as a part of your active theme functions.php file or as a separate .php file in a wp-content/mu-plugins folder – read more about Must Use plugins.