BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Item-list-tabs to show all options when logged in
- This topic has 4 replies, 3 contibutors, and was last updated 8 years, 9 months ago by Anonymous.
Question
February 6, 2016 at 10:43 pm #58370@franciscocavaliereDear support,
Trying to make my “item-list-tab activity-type-tabs” to show all items after logged in, regardless if there is content or not.
As of now, activity page only shows filter “my groups” if user has a group associated. Same applies for my friends and my likes.
Not sure if this is relevant information, but also have buddywall plugin installed.
This is the code from my child-theme/buddypress/activity/index.php
Thank you!
<div class=”item-list-tabs activity-type-tabs” role=”navigation”>
<div class=”choosen-wrap”><span class=”selected-tab”></span></div>-
<?php do_action( ‘bp_before_activity_type_tab_all’ ); ?>
<li class=”selected” id=”activity-all”>” title=”<?php esc_attr_e( ‘The public activity for everyone on this site.’, ‘boss’ ); ?>”><?php printf( __( ‘All Members <span>%s</span>’, ‘boss’ ), bp_get_total_member_count() ); ?>
<?php if ( is_user_logged_in() ) : ?>
<?php do_action( ‘bp_before_activity_type_tab_friends’ ); ?>
<?php if ( bp_is_active( ‘friends’ ) ) : ?>
<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
<li id=”activity-friends”>” title=”<?php esc_attr_e( ‘The activity of my friends only.’, ‘boss’ ); ?>”><?php printf( __( ‘My Friends <span>%s</span>’, ‘boss’ ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>
<?php endif; ?>
<?php endif; ?>
<?php do_action( ‘bp_before_activity_type_tab_groups’ ); ?>
<?php if ( bp_is_active( ‘groups’ ) ) : ?>
<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
<li id=”activity-groups”>” title=”<?php esc_attr_e( ‘The activity of groups I am a member of.’, ‘boss’ ); ?>”><?php printf( __( ‘My Groups <span>%s</span>’, ‘boss’ ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?>
<?php endif; ?>
<?php endif; ?>
<?php do_action( ‘bp_before_activity_type_tab_favorites’ ); ?>
<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
<li id=”activity-favorites”>” title=”<?php esc_attr_e( “The activity I’ve marked as a favorite.”, ‘boss’ ); ?>”><?php printf( __( ‘My Favorites <span>%s</span>’, ‘boss’ ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?>
<?php endif; ?>
<?php endif; ?>
<?php do_action( ‘bp_activity_type_tabs’ ); ?>
<?php do_action( ‘bp_activity_syndication_options’ ); ?>
</div><!– .item-list-tabs –>
Answers
February 8, 2016 at 5:42 am #58477@
AnonymousHi @franciscocavaliere, Wall plugin merged few items of Buddypress tabs..if you check it after deactivate the wall plugin it will show you all default items. In case of wall plugin, it provides better listings and merge non required tabs to save cluttered look.
Regards
February 8, 2016 at 6:10 am #58481@
AnonymousHi @franciscocavaliere, When you use wall plugin so it removes mentions , friends and groups and replace favourite with likes.
Thanks
February 8, 2016 at 7:36 am #58491@franciscocavaliereHi @pallavi, thanks for your help.
I apologize because I think I didn’t explain my question right. Replacing favorites for likes was a genius move and I like all benefits of the wall plugin.
What I wanted to do is to show the “my groups” filter even if you don’t have a group – “my friends” filter even if you don’t have friends yet – “my likes” filter even if you don’t have liked posts yet. (Obviously in these cases, the user will see default message of “no activity found”.
Should I just remove the “ifs” ?
<?php if ( bp_is_active( ‘friends’ ) ) : ?>
<?php if ( bp_is_active( ‘groups’ ) ) : ?>Seems like these are the lines that prevent them to be shown if are not active.
Attached 2 pictures of one user with all features used, and another user that haven’t liked any post yet (therefore won’t show the “my likes” tab.
Thank you!
FCFebruary 10, 2016 at 3:18 am #58762@
AnonymousIt’s default BuddyPress functionality
And if condition is added to check Group and Friend features are enabled or not, If they are enable they will be visible
It’s not on the basis of they have activity or notIf they do not have activity it will display no activity messages
But it will be display only for current user , when you will be on displayed user profile or any others members profile those tabs will not be visible
You can also discuss inside BuddyPress support
https://buddypress.org/support/
Regards
- The question ‘Item-list-tabs to show all options when logged in’ is closed to new replies.