Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group description excerpt – need to change it – where ?

  • Avatar of 4ella
    4ella
    Participant

    @4ella

    Hello where can I change Group description excerpt ? I would like to increase the length a little bit.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Apply a filter to “bp_get_group_description_excerpt” (located in bp-groups/bp-groups-templatetags.php).

    The default is 20 words.

    Try something like this in your theme’s functions.php:

    `function my_group_excerpt() {
    global $groups_template;

    $group = $groups_template->group;
    return bp_create_excerpt( $group->description, 40 ); // change 40 to anything you want
    }
    add_filter( ‘bp_get_group_description_excerpt’, ‘my_group_excerpt’ );`

    Code hasn’t been tested.

    Avatar of 4ella
    4ella
    Participant

    @4ella

    @r-a-y
    Working perfectly !! thank you very much !!
    I suggest to create the “snippets” TAB on this website and to put codes like the one above there.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.