Skip to:
Content
Pages
Categories
Search
Top
Bottom

Restricting Unregistered Members from seeing all pages

  • Avatar of mhannor
    mhannor
    Participant

    @mhannor

    What plugin can I use beside wp-members to restrict members from seeing any other pages. I want to redirect them to the custom registration form I created. Wp-members does that, but it changes the style of the page. Please advise and thanks its appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Try this plugin:

    http://wordpress.org/extend/plugins/restricted-site-access/

    `
    Just place this between opening and closing php tags in the bp-custom.php file:

    `
    On the below line you can change the /register to the page you want them redirected too!
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    For example:
    wp_redirect( get_option(‘siteurl’) . ‘/activity’ );

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Sorry the code got stripped out. Here is another try!

    function bp_guest_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // enter the slug or component conditional here
    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    } // user will be redirect to any link to want
    }
    }
    add_filter(‘get_header’,’bp_guest_redirect’,1);

    Avatar of darkartist69
    darkartist69
    Participant

    @darkartist69

    Do you use the plugin with the bp-custom.php or use one or the other?

    DA

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    The code above that goes in bp-custom.php blocks only buddypress specific pages from being viewed by logged out visitors. The plugin should block the wp post and pages. the bp-custom.php with the code and the plugin can be used together to block everything from logged out visitors.

    Avatar of Tagcloud
    Tagcloud
    Participant

    @rondena

    Cant find bp-custom.php?

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

You must be logged in to reply to this topic.