You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
Unable to view Dashboard and Settings as it's not available as an option in the admin.
To Reproduce
Step-by-step reproduction instructions
Custom role called 'technical_adminstrator' (not default adminstrator wp role)
Only seeing Workouts and Redirects in admin
Expected results
Should be seeing Dashboard, Settings, etc.
Technical info
Tried to add this action but still seeing Sorry, you are not allowed to access this page. in wp-admin/admin.php?page=wpseo_dashboard
function my_custom_capabilities() {
// Get current user
$current_user = wp_get_current_user();
if ( $current_user->roles[0] == 'technical_administrator') {
// Get current page
global $pagenow;
// Check if we're on a specific plugin's options page and if the user is the one specified
if ( $pagenow == 'admin.php' && isset($_GET['page']) && $_GET['page'] == 'wpseo_dashboard' ) {
// Temporarily add the 'wpseo_manage_options' capability to the user
$current_user->add_cap('wpseo_manage_options');
}
}
}
add_action('admin_init', 'my_custom_capabilities');
The text was updated successfully, but these errors were encountered:
Please give us a description of what happened
Unable to view Dashboard and Settings as it's not available as an option in the admin.
To Reproduce
Step-by-step reproduction instructions
Workouts
andRedirects
in adminExpected results
Dashboard
,Settings
, etc.Technical info
Tried to add this action but still seeing
Sorry, you are not allowed to access this page.
inwp-admin/admin.php?page=wpseo_dashboard
The text was updated successfully, but these errors were encountered: