Skip to:

Forums excerpt and description?

  • Mark


    Just an idea for the future, I wonder if it wouldn’t be an idea to have a seperate ‘excerpt’ and ‘description’ for forums.

    A lot of existing bbPress forums, including my own, have chosen to display a list of forums in the sidebar of their template. For this to remain readable and uncluttered, you pretty much have to include a 10 word or less description (give or take).

    Now while I realize this is our choice to do it this way and it’s also in no way a limitation of bbPress, it might be a welcome addition to have the two fields. This way on our forum list we could use the excerpt, and on the forum page itself call a much more detailed description (especially when you’re running support forums or the like).

    Anybody else?

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

  • Olaf Lederer


    Maybe you can shorten the desription using this custom php function?

    if (!function_exists('substring_words')) {
    function substring_words($str, $txt_len, $prefix = ' [...]') {
    $words = explode(' ', $str);
    $count = 0;
    $new_str = '';
    $abbr = '';
    foreach ($words as $val) {
    if ($count < $txt_len) {
    $new_str .= $val.' ';
    $count = $count + strlen($val);
    $new_str = rtrim($new_str, ' ,.;:');
    $new_str .= (strlen($str) > $txt_len) ? $prefix : '';
    return $new_str;



    @olaf, muchos appreciado senor, but I’ve already written my own workaround. :) Just more of a suggestion based on situations I’ve ran into, something to consider as a future feature to make it easier for those who aren’t at home with PHP.

    The problem with simply truncating such a thing is you could wind up with a front page description of something like “The following forum is a good place to…” or something of the sort. I’ve looked at a lot of other bbPress sites in the last couple of months, and they all seem to be fairly out of the box setups, so I’m not so sure this is really widely being sought out, just something that would be fairly easy to implement and might aid in future scalability of bbPress installations.

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