Skip to:

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sorry for the confusion. In testing, I reverted back to the stock, default theme to make sure there wasn’t anything else at issue. That worked, so I then made the update to functions.php and header.php in the Cosmic Buddy directory, and it now works properly. Fortunately, I’m doing all this on a test install, so it’s some good lessons learned!

    Thanks for your help!

    Ok, I got it to work. I added this…

    function sh_walled_garden()
    global $bp;
    if ( bp_is_register_page() || bp_is_activation_page() )
    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( $bp->root_domain .’/’. BP_REGISTER_SLUG );
    add_action( ‘walled_garden’, ‘sh_walled_garden’ );

    …into /wp-content/plugins/buddypress/bp-themes/bp-default/functions.php

    and added…

    …into the top of /wp-content/plugins/buddypress/bp-themes/bp-default/header.php

    So far, so good!

    As far as I recall, everything is “stock” except for me inserting the above function code into the end of the /wp-content/themes/cosmicbuddy/functions.php file.

    Should I be adding the function code to the functions.php file in the /wp-content/themes// directory?

    Just to clarify, the function code above is added to the functions.php in the theme’s directory (for example, /wp-content/themes/cosmicbuddy/) and NOT in the /wp-includes/ directory, correct?

    The source is here:

    The added function is at the bottom.

    I am using the CosmicBuddy BP theme.

    when I add the function to functions.php in my theme directory, when i navigate to any page of my site, it just comes up blank. Suggestion?

    It looks like you have a solution, so for those of us who need some additional coaching, can you please explain how to implement it?

    I just love what BuddyPress has to offer, however for privacy reasons, on the site I’m developing I need to hide several components like “Activity” and “Members” when a visitor is not logged in.


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