Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Link to administration in menu

@shanebp

Moderator

Rather than create a link for certain roles, just add a redirect for anyone who has a role not approved for access to wp-admin. There are lots of examples of this, google it.

For example, this will send everyone, other than admins, to the home page if they try to visits wp-admin:

function beatwell_block_users_backend() {
	if ( is_admin() && ! is_super_admin() && ! wp_doing_ajax() ) {
		wp_redirect( home_url() );
		exit;
	}
}
add_action( 'init', 'beatwell_block_users_backend' );
Skip to toolbar