Forums

Subscriber Only Page Not Logged In - Redirect to Login (1 post)

  1. jazfotodesign
    Member
    Posted 1 year ago #

    This question seems to be tired on here but I have yet to find a correct answer.

    I have tried a variety of plugins and currently using subscribers only to block page from non-students with a log-in redirection to that page when they are logged-in.

    I want students when they ARE NOT logged in, and try to access the page to be directed simply to wp-login

    WordPress has function <?php auth_redirect() ?> but alone it has shot php error.

    I have php enabled on page edit so I want to be able to throw in something like

    if not logged in
    redirect wp-login

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.