The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WP-Members: Membership Framework
[resolved] Block whole site or summary of postings? (3 posts)

  1. schoy
    Posted 5 years ago #

    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?


  2. Chad Butler
    Plugin Author

    Posted 5 years ago #

    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;
    } ?>
  3. schoy
    Posted 5 years ago #

    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' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic