Introduction
BuddyBoss does not provide an option to control how many characters or words appear in a group’s description excerpt. You can customize this using a small function added to your active theme. This allows you to either set a specific character limit or display the full description for group listings. This guide explains how to change the group description excerpt length.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
- From the Theme Files list, open Theme Functions (functions.php).
- Add one of the following code snippets just before the closing PHP tag ?>, depending on your desired behavior:
Option 1: Limit the Group Description to a Specific Number of Characters
Replace 2000 with the number of characters you want to display:
add_filter( 'bp_get_group_description_excerpt', 'custom_bp_get_group_description_excerpt', 100, 2 );
function custom_bp_get_group_description_excerpt($excerpt, $group) {
$group_link = '... <a href="' . esc_url( bp_get_group_permalink( $group ) ) . '" class="bb-more-link">' . esc_html__( 'View more', 'buddyboss-theme' ) . '</a>';
if ( bp_is_single_item() ) {
$group_link = '... <a href="#group-description-popup" class="bb-more-link show-action-popup">' . esc_html__( 'View more', 'buddyboss-theme' ) . '</a>';
}
return bp_create_excerpt( $group->description, 2000, array( 'ending' => $group_link ) );
}Option 2: Display the Full Group Description
/code
add_filter( 'bp_get_group_description_excerpt', 'custom_show_entire_bb_get_group_description', 999, 2 );
function custom_show_entire_bb_get_group_description( $excerpt, $group ) {
if ( empty( $group ) ) {
return $excerpt;
}
return wpautop($group->description);
}- Click Update File to save the changes.
Troubleshooting and FAQs
Q: The group description is still truncated.
A: Make sure the code is added to your child theme’s functions.php file. Clear any caching plugins and refresh the page.
Q: Can I switch between character limit and full description later?
A: Yes. Simply replace or comment out one code snippet and use the other.
Q: Will this affect single group pages?
A: Option 1 automatically adjusts the link for single group pages. Option 2 shows the full description everywhere.
Q: Can I revert this change easily?
A: Yes. Remove or comment out the code from functions.php and save the file.