Is there a way to have “Pages” set as the default tab when the user logs in to the admin area? I am using a heavily customised set up, where none of the dashboard widgets are useful so they are hidden anyway.
3 s
The best way is to re-direct user logins to your page and also remove the dashboard from the menu, this can be done with 2 filters.
Redirect logins to your page edit screen example based on user roles, this example uses “author”:
function dashboard_redirect($url) {
global $current_user;
// is there a user ?
if(is_array($current_user->roles)) {
// check, whether user has the author role:
if(in_array('author', $current_user->roles)) {
$url = admin_url('edit.php?post_type=page');
}
return $url;
}
}
add_filter('login_redirect', 'dashboard_redirect');
Remove the “dashboard from the admin menu”
add_action( 'admin_menu', 'Wps_remove_tools', 99 );
function Wps_remove_tools(){
remove_menu_page( 'index.php' ); //dashboard
}
ps. You can also order the admin menu items using the same filter.