How do i make my wordpress website private?
You can simply check if the user has an specific role, and redirect them to homepage if they try to access the admin panel. function redirect_to_front(){ // Check if we are on the admin panel, and the user is not an admin if( is_admin() && !current_user_can( ‘administrator’ ) ){ // Redirect them back to front … Read more