Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to edit the activity on Buddypress (1.7 and running latest Wordpress) for when a new blog post is created. By default it displays the excerpt and shows any attached images, it also strips any code (I think).

What I'm trying to achieve is to show the full blog post, including things like galleries. Doing some searches through the internet and the docs led me to:

bp_activity_content_body() and bp_create_excerpt

Help from the online community has led me to:

bp_activity_truncate_entry in bp-activity-filters.php

But I can't seem to figure out how to work the filters (apply / add). I tried the following (for bp_activity_truncate_entry), but no succes so far:

apply_filters ('bp_activity_excerpt_length', 500); 

And the following for bp_create_excerpt:

remove_filter( 'bp_create_excerpt', $length, $options ); 
function pnb_excerpt(){     $lenght = 500;  
$options = array(       'ending' => __( ' […]', 'buddypress' ),
 'exact'             => false,
  'html'              => false,
  'filter_shortcodes' => $filter_shortcodes_default); } 
add_filter( 'bp_create_excerpt', 'pnb_excerpt', $length, $options );

(Also tried apply instead of add) Neither of them seem to work. But again I am not sure how to work these filters. Can anybody point me in the right direction?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.