I Dont Want BuddyPress Navigation To Show

Hi,

I got the basics not to show via the backend admin area, but there is one navigation button that I only want to show if a user is logged in.

In the menu under the header, I want to hide "Groups" to people that are not logged in.

I see where the code is in the header.php file, but I am a level 1 php guy so I dont know what to do to the code to only show 'Groups" and its content if the user is logged in.

http://fastlubemarketing.com/

Thanks,
Anders

  • infinitesynergy

    Also, I have the same issue with the search feature. I only want people that are logged in to be able to search.

    Here is the code:

    <div id="searchbox">
    <?php if($bp_existed == 'true') { ?>

    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
    <input type="text" id="search-terms" name="search-terms" value="" />
    <?php echo bp_search_form_type_select() ?>
     <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    <?php wp_nonce_field( 'bp_search_form' ) ?>
    </form>

    <div id="fc_wrap">
    <?php if ( !is_user_logged_in() ) : ?>

    <?php $check_active_signup = get_site_option( 'registration' ); if( $check_active_signup == 'none' ) { //if signup allowed ?>
    <?php } else { ?>
    <form name="login-form" id="login-form" action="<?php echo site_url( 'wp-login.php' ) ?>" method="post">
    <input type="text" name="log" id="user_login" value="<?php _e( 'Username', 'buddypress' ) ?>" onfocus="if (this.value == '<?php _e( 'Username', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', 'buddypress' ) ?>';}" />
    <input type="password" name="pwd" id="user_pass" class="input" value="" />
    <input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', 'buddypress' ) ?>" />
    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>
    <?php if ( 'none' != bp_get_signup_allowed() && 'blog' != bp_get_signup_allowed() ) : ?>
    <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    <?php endif; ?>
    <input type="hidden" name="redirect_to" value="<?php echo bp_root_domain() ?>" />
    <input type="hidden" name="testcookie" value="1" />
    <?php do_action( 'bp_login_bar_logged_out' ) ?>
    </form>
    <?php } ?>

    <?php else : ?>

    <div id="logout-link">
    <?php bp_loggedin_user_avatar( 'width=20&height=20' ) ?>   <?php bp_loggedinuser_link() ?> / <?php bp_log_out_link() ?>
    <?php do_action( 'bp_login_bar_logged_in' ) ?>
    </div>

    <?php endif; ?>

    </div>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.