Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Disable /wp-admin/ for “normal” users

function block_wp_admin_init() {
if (strpos(strtolower($_SERVER['REQUEST_URI']),'/wp-admin/') !== false) {
if ( !is_site_admin() ) {
wp_redirect( get_option('siteurl'), 302 );
}
}
}
add_action('init','block_wp_admin_init',0);

(might be better to use admin_init ?)

Skip to toolbar