• Resolved schoy

    (@schoy)


    I notice that when users are not logged in, they can still see summary in recent posts.

    If not logged in, is there a way to block the whole site and redirect to the login/registration page?

    If not, is it possible to not show the summary of postings?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    There isn’t anything built into the plugin. But you could work something into your theme.

    Supposing you created a login page with the [wp-members page=”login”] shortcode and wanted unregistered users directed to there, then you could wrap The Loop with something like this…

    <?php if( is_user_logged_in() ) { ?>
    
    ... The Loop goes here ...
    
    <?php } else {
    
    wp_redirect( 'http://mydomain.com/myloginpage' ); exit;
    
    } ?>
    Thread Starter schoy

    (@schoy)

    Thanks for the tip. I ended up redirecting in the header.php, something like this:

    if (!(is_user_logged_in())) {
    if (($_SERVER[“REQUEST_URI”] != ‘/login-page’){
    wp_redirect( ‘http://my.domain.com/login-page&#8217; );
    exit;
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Block whole site or summary of postings?’ is closed to new replies.