Lock out all WordPress Administrators except two specific users
|| means OR. Your code will never allow $current_user to proceed because one of the OR conditions will fail. Try using AND && instead: if ( ($current_user->user_login != ‘john’) && ($current_user->user_login != ‘sheila’ ) ) {