I'm successfully using this code to redirect /wp-admin/index.php (WP Dashboard) to another specific Admin page. I would now like to limit this action to a specific user role (i.e Author).
add_action( 'admin_init', function () {
global $pagenow;
# Check current admin page.
if ( $pagenow == 'index.php' ) {
wp_redirect( admin_url( '/admin.php?page=wuapc-page-376' ) );
exit;
}
} );
use wp_get_current_user