• Hello,
    Inside the members directory tab there is the option to filter users by Following, but how can I add also the Followers tab?

    
    //Add followers tab inside memebers directory
    function bp_follow_dbfollowers_tab() {
    	if ( ! is_user_logged_in() ) {return;}
    	$counts = bp_follow_total_follow_counts( array( 'user_id' => bp_loggedin_user_id() ) );
    	if ( empty( $counts['followers'] ) )
    		return false;
    	?>
    	<li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'Followers <span>%d</span>', 'bp-follow' ), $counts['followers'] ) ?></a></li><?php
    }
    add_action( 'bp_members_directory_member_types', 'bp_follow_dbfollowers_tab' );
    

    This code is not complete, I need help. Thanks

  • The topic ‘Add “Followers” in directory tab’ is closed to new replies.