Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @valkukov

    Participant

    PS. This only seemed to work for me using ftp to upload my theme with the above script inserted into the functions.php file already.

    NB watch out when you copy the code from this forum as it can alter the script in places

    @valkukov

    Participant

    Please ignore my last post.

    @Travel-Junkie It works a treat. Thanks very much. Just added the code below within the php tags in my active theme’s functions.php file (…/wp-content/themes/XXXXXX/functions.php) and that was all I had to do. Very nice indeed. Now the site is only visible to logged in users (except for blog posts which are visible to everyone)

    function sh_walled_garden()
    {
    global $bp;

    if( bp_is_register_page() || bp_is_activation_page() )
    return;

    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( $bp->root_domain .’/’. BP_REGISTER_SLUG );
    }
    add_action( ‘get_header’, ‘sh_walled_garden’ );

    @valkukov

    Participant

    hi everyone, sorry to be a pain in the a** but I was wondering whether anyone could write a summary post stating the cleanest simplest way to achieve a private network (including where to paste the statements and in which files). Sounds like @Travel-Junkie has the winning ticket but a lot of amendments/improvements have been made. Can anyone help? TX

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar