Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How can I make only one tab visible to users who are not logged in on Profiles?

@izzyian

Participant

I think I may have found the navigation bar that has to do with users profiles location. Called home.php, in it I see some lines like :

<?php do_action( 'bp_before_member_body' );

  elseif ( bp_is_user_friends() ) :
	locate_template( array( 'members/single/friends.php'   ), true )

  elseif ( bp_is_user_forums() ) :
	locate_template( array( 'members/single/forums.php'    ), true );

So I see the tags “friends” and “forums”. I assume I have to make an If/else statement.

1.) I guess an example code of what I need help with would be

if ( is_user_logged_in() ) {

// SHOW FRIENDS TAB AND FOURMS TAB

<?php } else { ?>

// SHOW NO FRIENDS TAB, SHOW NO FOURMS TAB
			<?php } ?>

2.) And Would I place the If/Else statement you help me with in the home.php file or my child theme functions file?

Skip to toolbar