I am working on buddypress activity loop. I want to get current activity id or all activity parameters in entry.php file. but i am not able to get activity id.

I am trying to use


But not able to get id.

Please help. Thanks


That function is called right in entry.php as follows:

<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">

Note that bp_activity_id() will echo the value. To use the value in code, call bp_get_activity_id().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.