Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to redirect to login page if user's not logged in


  • dwbroad
    Participant

    @dwbroad

    If a user clicks a url to an existing post such as:

    `www.some-address.org/topic/website-ideas/#post-1893
    `
    and they are not logged in, it currently takes them to ‘Page Not Found’ page. Is it possible to send them to a login page instead?

    Ideally then would be sent to the login page, then be redirected to the required address.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Lynq
    Participant

    @lynq

    In your template files you could check if the user is logged in and if they aren’t then redirect them to your login page.


    dwbroad
    Participant

    @dwbroad

    Thanks for your reply.

    I have just tried putting something at the top of the bbpress.php file but it seems that it never even reaches that file, wordpress seems to decide straight away that the page doesn’t exist so sends it to the 404 bypassing bbpress completely….

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.