WordPress: Remove dashboard and redirect to edit posts or pages

Last updated on

I’ve never found the dashboard useful for any of my projects. Instead, I prefer to remove it entirely and redirect straight to the edit posts or pages list.

Add the following code to the end of functions.php

add_action( 'admin_menu', 'remove_dashboard', 99 );
function remove_dashboard(){
   remove_menu_page( 'index.php' ); //dashboard
}

function admin_default_page() {
   return 'wp-admin/edit.php?post_type=page'; //your redirect URL
}
add_filter('login_redirect', 'admin_default_page'); 

You can change the return URL to whatever you want.

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

Leave a reply

Your email address will not be published. Required fields are marked *