• Hi All,

    I have been banging my head against the wall for weeks with this. I have tried several methods and combinations to achieve the auth_redirect function to no avail.

    I need to redirect a non-logged in user to the login page when they visit a page marked as published privately and then back to the referring page after login.

    I have created functions in the fuinctions.php file to is_user_loggedin based on a page id and redirect to url if not, I have also tried adding auth_redirect to the .php template for the specific page.

    Please help me out here, how can I achieve this?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • I am also having problem with getting redirect to work in a page template.
    just after the “get_header()” part.

    the error “Warning: Cannot modify header information” appears but i dont actually understand how to work around this. Why can’t auth_redirect take care of this?

Viewing 1 replies (of 1 total)
  • The topic ‘Auth_redirect not working’ is closed to new replies.