Use this php code:
$author_id=get_the_author_ID();
$current_user_id=get_current_user_id();
if($author_id != $current_user_id) {
echo $userpro_social->follow_text($author_id, $current_user_id);
}
This will allow users to follow the author of the post/page. This will prevent the follow button to be displayed if you are logged in and it’s your own post as well.
Leave A Comment?