Display current count of bookmarks, followers and following for a user

To display the count of following for a user:

get_current_user_id() is current logged in user ID.

We assume you will check that the user has logged in already

<?php
global $userpro;
echo $userpro_social->following_count_plain(get_current_user_id());
?>

To display the count of followers for a user:

<?php
global $userpro;
echo $userpro_social->followers_count_plain(get_current_user_id());
?>

These will return the count in “plain” format. You can customize everything else.

To show total number of pages that user has bookmarked: You will need the updated version of Bookmarks addon API

<?php
bookmarks_count(get_current_user_id());
?>

Was this article helpful?

Related Articles

Leave A Comment?