How to set privilege to wordpress subscriber for private page
I am having private page.I want to show this page only when “subscriber” logged in.”Editor” should not access this page.How can i set the privilege. 2 Answers 2 Without a plugin something like this should work //functions.php function get_user_role() { global $current_user; $user_roles = $current_user->roles; $user_role = array_shift($user_roles); return $user_role; } //page template $role = … Read more