Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20039

    I usually use a redirect in my header to redirect the home to a landing page during site dev but it’s not working in choices.

    if( !is_user_logged_in() ) {

    wp_redirect(‘coming-soon’);

    exit;

    }

    I get the redirect but the page is blank. Is there a better place to put this while I’m building the site? Is it because of the redirect in the avia_default_dynamics function?

    #106082

    Hi dlibert,

    Try using an absolute url for the redirect. It should run before the avia frontpage check and work.

    You can also use the wordpress maintenance mode and then create a maintenance.php file or any of the plugins that have dashboard widgets and backend functions to cover that as well.

    Regards,

    Devin

    #106083

    So I should put it in the index.php before the frontpage check and not in the header? I’d experiment with it right now but the site is live and I have a 301 redirect in place.

    Put it in it’s own <?php block or right before “do_action(‘avia_action_frontpage_check’);”?

    #106084

    If you typically used it in the header than the header.php. If you are unsure, just go with a plugin that will handle it without issue and not cause any issues with a live site.

    Regards,

    Devin

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Redirect non logged in users’ is closed to new replies.