Introduction
When building custom templates or plugins for BuddyBoss (built on BuddyPress), you often need the ID of whatever object is currently being viewed—whether that’s a user’s profile or an activity post. This guide shows you the simplest functions to retrieve:
You can also refer to this documentation on on how to get the Activity Feed post:
https://www.buddyboss.com/resources/reference/functions/bp_activity_get_activity_id/
Troubleshooting and FAQs
Q: How do I get a group’s ID on a group page?
A: Use bp_get_current_group_id() or within a loop groups_get_current_group()->id.