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
bp_activity_id();
But not able to get id.
Please help. Thanks
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI 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
bp_activity_id();
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()
.