Advertisement
Guest User

Add follow/following count to member accountheader

a guest
Jul 16th, 2010
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php function my_follow_following(){
  2. global $bp;
  3.  
  4. $counts = bp_follow_total_follow_counts( array( 'user_id' => $bp->loggedin_user->id ) ); ?>
  5. <p>
  6. <span id="stalking-me">Followers: [<?php echo $counts[followers]; ?>]</span>
  7. <span id="i-am-stalking">Following: [<?php echo $counts[following]; ?>]</span>
  8. </p>
  9. <?php
  10. }
  11. add_action('bp_before_member_header_meta', 'my_follow_following');
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement