Include post categories in activity items
I would like to include the post category with the author name and post title. I have looked all over and found a bunch of answers along these lines
$activity_action = sprintf( __( '%1$s added the post, %2$s in the categories %3$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', get_the_category_list( ', ', '', $post->ID ) );
I have tried using the various functions available for getting the categories but no luck. Worth noting is that the current Buddypress version is using
$activity_actionand the rest of the arguments have been modified also.
I tried adding
into my theme’s
functions.phpfile but nothing.
What am I missing?
Thanks in advance.
- You must be logged in to reply to this topic.