• Resolved Irfan Shams

    (@shamsirfan)


    I am using this to restrict access to my entire website and would like the users to login and be directed to the homepage.

    I want users not see my whole website including home page without login.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Rocket Burn

    (@rapaluwe)

    Hi @shamsirfan

    Just need to add this code at the top of your header.php

    <?php 
    if ( !is_user_logged_in() ) {
       auth_redirect();
    } 
    ?>
    Plugin Author Joachim Jensen

    (@intoxstudio)

    @shamsirfan

    If the solution provided by @rapaluwe doesn’t work out for you, try adding “redirect” as a parameter to the login form shortcode:
    [login-form redirect=url]

    A quick way to “lock down” and make sure e.g. only Administrators can see all content is to create a new Access Level for Administrators with a negated condition group containing “404 Page”. This means that normal users only can see the 404 Page.

    By default, Administrators will have access to all content regardless of your levels.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Home page redirection’ is closed to new replies.