Skip to:
Content
Pages
Categories
Search
Top
Bottom

Increase length of topic excerpts


  • kraigg
    Participant

    @kraigg

    Hi there,

    I am using bbp_topic_excerpt() inside loop-single-topic.php (in custom theme) to display excerpts in my forum topic listing page. The excerpt only displays 100 characters before it cuts off

    I was wondering if there’s a way to increase the excerpt length (to say, 200 characters), without hacking any of the core files?

    I’m using bbPress 2.1.2, Buddypress 1.6.1, WordPress 3.4.2

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

  • Michael
    Participant

    @michaelhpdx

    I am also interested in finding a reliable and simple way to display a post excerpt without having to hack the core files.

    Michael


    Michael
    Participant

    @michaelhpdx

    Checking the function code in bbp_topic_template.php, the call bbp_topic_excerpt() already accepts a $length argument; the default is 100, but it can be changed. Doh! It can be used as-is.

    Michael


    Back to Front
    Participant

    @traverser11

    I was having a bunch of trouble with this too, 8 years later!

    I tried
    bbp_topic_excerpt('200')
    and
    wp_trim_words( bbp_topic_excerpt(), 200, '...' );
    But they wouldn’t actually change the excerpt length.

    Anyway I found this other function in bbpress files, that does the job.
    bbp_get_topic_excerpt($topic_id = 0, $length=200)


    Robin W
    Moderator

    @robin-w

    thanks for posting 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar