Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • zudie
    Participant

    @zudie

    Use this code in either your functions.php or bp_custom.php:

    `add_filter( ‘bp_blogs_activity_new_post_content’, ‘my_activity_content’, 2, 10 );
    function my_activity_content($activity_content, $post, $post_permalink){
    $postid=$post->ID;
    $activity_content = get_the_post_thumbnail( $postid );
    $activity_content .= bp_create_excerpt( $post->post_content, 25 );
    return $activity_content;
    }`

    This creates the content block of your activity stream. In the example it adds the thumbnail for the featured image and it creates an excerpt.


    zudie
    Participant

    @zudie

    I think I got the right direction for you:

    In bp-custom.php add:

    `/Change wording in Activity Stream and use post_type iso of ‘post’
    add_filter( ‘bp_blogs_activity_new_post_action’, ‘im_activity_content’, 2, 10 );

    function im_activity_content($activity_content, $post, $post_permalink){

    $activity_content = sprintf( __( ‘%s submitted a new ‘.$post->post_type.’: %s’, ‘buddypress’ ), bp_core_get_userlink( (int)$post->post_author ), ‘‘ . $post->post_title . ‘‘ );
    $activity_content .= bp_create_excerpt( $post->post_content, 25 );

    return $activity_content;
    }`

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar