How to block a category from one user and enable the category for the rest of the users
We will use the my_force_login() function that will force the users to login when they press on a specific category. Wp-login.php if ( ( empty( $redirect_to ) || $redirect_to == ‘wp-admin After this condition ends write this part if ($user_name == “student”) { wp_safe_redirect(“http://www.domain.co.il /?cat=4”); } else { wp_safe_redirect($redirect_to); } Inside the condition write the … Read more