We would like to show the Buddypress User Badges in the Activity feed after a person’s name. Is there a filter or other hook we can use to do this?
Hi Ted,
Thank you for the question.Yes, there are ways to achieve it. would you like to show one or all badges of the user?
Also, which theme and template pack are you using?
Regards
BrajeshRight now we only have one badge setup for our Administrator Role so community members know they are talking to someone on the support team. So for now we only need one badge but wouldn’t hurt to maybe show all in the future.
We are using the Kleo WordPress Theme and the Buddypress Legacy template pack
Thank you Ted.
Please allow me to check and get back to you by tomorrow.Regards
BrajeshHi Ted,
Thank you for the patience.I had a look at the kleo theme and BuddyPress in general.
The display name in activity is not built dynamically and there are no hooks available there.
We can use this code to display the badges of activity author
<?php if ( function_exists( bp_user_badges_get_user_badges_html ) ) { echo bp_user_badges_get_user_badges_html( bp_get_activity_user_id() ); }
But it needs to be put somewhere in the kleo/buddypress/activity/entry.php (You can copy this file to child theme) and put the code.
Regards
Brajesh
You must be logged in to reply to this topic.