BuddyDev

Search

[Resolved] Display followers tab in members directory

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #35879
    This reply has been marked as private.
  • Participant
    Level: Guru
    Posts: 900
    Tosin on #35904

    Hello Ravi,

    Problem solved using the priority number 20

     function bpfollow_add_followers_tab() {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$count = bp_follow_get_the_followers_count();
    
    	if ( empty( $count ) ) {
    		return;
    	}
    ?>
    
    	<li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li>
    
    <?php
    }
    add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab', 20 ); 
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #35906

    Hello Tosin,

    Thank you for the acknowledgement. I am glad that issue is resolved.

    Regards
    Ravi

The topic ‘ [Resolved] Display followers tab in members directory’ is closed to new replies.

This topic is: resolved