WordPress.org

Ready to get started?Download WordPress

Forums

Category Access Plugin - Permalinks 404 until logged in. Redirect to login? (2 posts)

  1. jasonh1234
    Member
    Posted 6 years ago #

    I'm using Category Access plugin which keeps all posts private unless the user is logged in. (guests have no post view privelages)
    If user isn't logged in (counted as guest) they get the sidebar only and a message in a post box telling them they need to log in to view posts with a link to the login.

    This works fine but...

    Permalinks are resulting in a browser default 404 error (with no parts of the site visible) to any user that isn't already logged in.

    If the user IS logged in they can go straight to the post as normal.

    The private target audience is as techically savy as a bunch of cavemen and won't know to go login first when met with a blank page.

    I need to have the 404 redirect to the login page instead and upon succesful sign-in, forward them to the permalink.

    How do I do this?

  2. coppit
    Member
    Posted 6 years ago #

    I added this feature to 0.8.1, which I will release soon:

    When surfing to the permalink for a protected post, the user will now be redirected to the login page if they cannot view the post and are not logged in. Note that after logging in, they may still see an Error 404 if they do not have permissions to view the post.

    If you want to see a message like "you can't see this", you'll need to set the option to show a message.

Topic Closed

This topic has been closed to new replies.

About this Topic