0

I wan to display my custom created action activities in activity tab of groups but it is displaying in activity tab which is global. I had tried alot of solution on internet but no one is working.

add_action('wp_insert_post', array($this, 'bd_custom_bp_record_activity'));
$gid = bp_get_group_id();
groups_record_activity(array(
    'action' => apply_filters('groups_activity_new_update_action', sprintf(__('%1$s created an event %2$s', 'buddypress'), bp_core_get_userlink(get_current_user_id()), '<a href="' . bp_get_group_permalink() . '">' . esc_attr(bp_get_group_name()) . '</a>')),
    'content' => 'new post',
    'type' => 'created_event',
    'item_id' => $gid,
    'user_id' => get_current_user_id(),
)
);

Your Answer

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

Browse other questions tagged or ask your own question.