Skip to:
Content
Pages
Categories
Search
Top
Bottom

Site Tracking not working with blog post excerpts


  • Michael
    Participant

    @michael8888

    If Site Tracking is enabled new blog posts appear in the activity stream. BuddyPress uses the beginning of the blog post to create an excerpt for the activity update and ignores the blog excerpt. This doesn’t really make sense because the blog post excerpt obviously describes the article much better.

    It is possible to change this BuddyPress behavior with something like this in functions.php:

    function filter_bp_create_excerpt( $text, $original_text, $length, $options ) { 
     
        $text = '<p>' . get_the_excerpt() . '</p>';
        return $text; 
    }           
    add_filter( 'bp_create_excerpt', 'filter_bp_create_excerpt', 10, 4 );

    However, this only works if you publish the post manually. If you work with scheduling, BuddyPress will not post any excerpt when using this filter. The same applies if you change the blog post status in Quick Edit from “draft” to “published.”

    Is there any chance that you change this odd BuddyPress behavior in a future update or does anyone know a better filter that solves this problem?

  • You must be logged in to reply to this topic.
Skip to toolbar