Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to change the Default "Home" admin page when logging into the WordPress Dashboard?

I thought about a couple of possibilities...

  1. Substitute the content on the Dashboard home page with custom content.
  2. Redirect to a different admin page within the WordPress Dashboard upon successful login.

If it is possible to do either of the two options, what hooks would you recommend utilizing?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Easy enough, decided to just do the redirect option. I used the wp_login action hook. You could also probably use this for redirecting your users to ANY page on your website. You can also check user capabilities from the $user Object passed in as a function parameter if you want to send different user levels to different pages.

/* Redirect the user logging in to a custom admin page. */
function new_dashboard_home($username, $user){
    if(array_key_exists('administrator', $user->caps)){
        wp_redirect(admin_url('admin.php?page=c2c-overview', 'http'), 301);
        exit;
    }
}
add_action('wp_login', 'new_dashboard_home', 10, 2);
share|improve this answer
1  
Thanks, it works great. –  Steffi Jan 24 at 11:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.