Skip to:
Content
Pages
Categories
Search
Top
Bottom

excerpt length

  • @jwind

    Participant

    Can’t change it. Is there a filter or something that in the default BP installation that would prevent the following from working?
    `<?php
    // Add custom excerpt length
    function custom_excerpt_length($length) {
    return 20;
    }
    add_filter(‘excerpt_length’, ‘custom_excerpt_length’);
    ?>`

Viewing 2 replies - 1 through 2 (of 2 total)
  • @cnorris23

    Participant

    Depends on where you’re trying to alter the excerpts. If you’re trying to change the exceprt length of a blog post, then this should work. Otherwise, you’ll want to take a look at `bp_create_excerpt()`. As of right now, this doesn’t have a filter, so you’re a bit stuck. If you could post a feature request ticket on Trac (http://trac.buddypress.org) explaining what need and reference this post, I’ll take a look at creating a patch to remedy this.

    @jwind

    Participant

    I’m sorry, I should have been more specific. It’s for main blog posts which is why I’m so confused. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘excerpt length’ is closed to new replies.
Skip to toolbar