Is there a setting to make new blog posts show in the Activity stream, as on the demo page?
I’m also trying to add custom post type with the following code, but I guess that cannot work as long as the regular posts are not showing:
COPY CODE
add_filter ( 'bp_blogs_record_post_post_types', 'activity_publish_custom_post_types',1,1 );
function activity_publish_custom_post_types( $post_types ) {
$post_types[] = 'second-hand';
return $post_types;
}
add_filter('bp_blogs_activity_new_post_action', 'record_cpt_activity_action', 1, 3);
function record_cpt_activity_action( $activity_action, $post, $post_permalink ) {
global $bp;
if( $post->post_type == 'second-hand' ) {
$activity_action = sprintf( __( '%1$s created a new second hand item, %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '' . $post->post_title . '' );
}
return $activity_action;
}