Put this at the top of your template you want to restrict:
<?php /** * If user's not logged in, send to login page. */ if (!current_user_can('read')) { header('Location: ' . wp_login_url(get_permalink())); exit; }
Put this at the top of your template you want to restrict:
<?php /** * If user's not logged in, send to login page. */ if (!current_user_can('read')) { header('Location: ' . wp_login_url(get_permalink())); exit; }
Leave a Reply