Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display forum'description on the front-end

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

  • Robin W
    Moderator

    @robin-w

    The forums list display comes under the template

    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php

    There are many hooks in this

    Line 44 does the sub forum display

    I found this solution :

    add_action( 'bbp_template_before_single_forum' , 'xxxx_bbp_display_forum_description' );
    
    function xxxx_bbp_display_forum_description() {
        echo '<div>';
        bbp_forum_content();
        echo '</div>';
    }

    Maybe better like this :

    add_action( 'bbp_template_before_single_forum' , 'xxxx_bbp_display_forum_description' );
    
    function xxxx_bbp_display_forum_description() {
    
        $display_forum_description = bbp_get_forum_content();
    
        if ( bbp_is_single_forum() && ! empty( $display_forum_description ) ) {
        
            echo '<div class="bbp-display-forum-description">';
            echo $display_forum_description;
            echo '</div>';
    
        }

    }


    Robin W
    Moderator

    @robin-w

    looks good, have you tried it and does it work,

    If so I’ll add it to the codex

    Yep, works perfectly 🙂


    Robin W
    Moderator

    @robin-w

    Thanks, I’ve slightly amended it to get it to display on all pages and added it to the documentation

    Layout and functionality – Examples you can use

    Thanks again for posting your solution !


    zeineddine
    Participant

    @zeineddine

    Gilles, can’t thank you enough. Just what I was looking for. Works beautifully.

    Rob

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