This simple function will redirect any logged in users (apart from admins) back to the homepage if they try to access the wp-admin folder directly. Add the following code your theme’s functions.php file.
add_action('admin_menu', 'redirect_dashboard'); function redirect_dashboard(){ if( !current_user_can('level_10') ){ if( preg_match('#wp-admin/?(index.php)?$#', $_SERVER['REQUEST_URI']) && ('index.php' != $menu[$page][2]) ) wp_redirect(get_bloginfo('url')); } }