Hi Brajesh,
I’m using bp-nouveau and I have activated the Group Homepage and the option to…
“Display the group description in the body of the group’s front page.”That description is sometimes long and that way I’m using this code to get an excerpt in group header…
function bp_excerpt_group_description( $description ) { $length = 170; $description = substr($description,0,$length); return $description; } add_filter( 'bp_get_group_description', 'bp_excerpt_group_description');
…but I would like to see all the text in the body of the group’s front page and not an excerpt.
Would you please change the code the way that I get the excerpt in the group header and full text in the body.
Thanks, Hans
…would be nice to have an excerpt ending with “…”!
PS: and with the code I mentioned I got some warning in my error log…
Warning: explode() expects parameter 2 to be string, array given in /home/www-data/<domain>/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/functions.php on line 724
IgnoreWarning: array_map(): Expected parameter 2 to be an array, null given in /home/www-data/<domain>/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/functions.php on line 725
Hi Hans,
I will look into it and assist you tomorrow.Thank you
BrajeshHi Brajesh,
Do you have a minute today to assist me?Thanks, Hans
Hi Hans,
Sorry but I am not able to provide any snippet.BP Nouveau does not provide any consistent action hook between the header and the content.
If there were any, we could have used did_action() to easily accomplish it.My suggestion will be to override default-fron.php and put this line at top.
remove_filter( 'bp_get_group_description', 'bp_excerpt_group_description');
That way, you remove the above filter from being applied to front page content.
Regards
BrajeshHi Brajesh,
That’s working perfect. Thank you!
Regards,
HansThank you. I am glad it is working 🙂
Regards
Brajesh
The topic ‘ [Resolved] BP Group Description’ is closed to new replies.