Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is there some weird reason why activity excerpts won’t change length?


  • homelesshenry
    Participant

    @homelesshenry

    I’m trying to change the excerpt length for the activity feed. And I can’t figure out why it’s been so difficult.

    For example, I’ve used the following code:

    function buddydev_modify_excerpt_length( $length ) {
    	$length = 1225;
    
    	return $length;
    }
    add_filter('bp_activity_excerpt_length', 'buddydev_modify_excerpt_length' );

    I even went into bp-core/bp-core-template.php for a hard-coded solution:

    function bp_create_excerpt( $text, $length = 1225, $options = array() ) {

    Still it doesn’t change my excerpt length. I then thought it might be the theme I’m using (Buddyboss) and went poking around but couldn’t find anything; although maybe there is something and I didn’t look well enough.

    Otherwise, could it have anything to do with the activity feed posts in question being added post types (woocommerce product pages) via the guide by Mathieu Viet:

    Post Types Activities

    Anyone else have similar issue or know what it might be?

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