User’s replies / topics outside the profile page
WP : 5.0.2
bbPress : 2.5.14
Theme : Custom (built with _S)
Im trying to simply display the number of “points” earned by the current user (points = replies + topics), but outside the profile page (in my header actually, so basically on my whole website).
Here is what I tried :
$topics = bbp_get_user_topic_count_raw();
$replies = bbp_get_user_reply_count_raw();
$totalTopics = $topics * 5;
$totalsReplies = $replies * 2;
$points = $totalTopics + $totalsReplies;
echo ” points = $points.”;
When Im on the user’s profile page, this code worked lovely, but when Im outside of this page, anywhere on my website, it displays nothing.
Any idea of what is exactly my issue ?
- You must be logged in to reply to this topic.