Support » Plugins » Hacks » auth_redirect not working

Viewing 2 replies - 1 through 2 (of 2 total)
  • auth_redirect is not responding as mentioned in the documentation of wordpress. kindly share any idea how to implement the following:
    i am showing excerpts on homepage.whenever user clicks on read more link, he should be redirected to full post only if he is logged in.otherwise he should be redirected to login page and after login page, he should be sent to full post.

    Everyone here is quite lazy so I searched more and found the following solution for my problem

    I used the following code to check whether user is logged in before viewing the complete post.
    if(is_singular())
    {
    if(!is_user_logged_in())
    {
    auth_redirect();
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘auth_redirect not working’ is closed to new replies.