Raziel_LOK (@raziel_lok)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • I made it, using the same code above, you can add your own class if you want. And including more loops you can list depeer forums.

    Here is the code:

    Code:

    <?php

    $before = ‘<ul class=”bbp-forums”>’;
    $after = ”;
    $link_before = ‘<li class=”bbp-forum”>’;
    $link_after = ”;

    if ($sublist = bbp_forum_get_subforums($forum_id)) {
    echo $before;
    foreach ( $sublist as $sub_forum ) {
    // Get forum details
    $permalink = bbp_get_forum_permalink( $sub_forum->ID );
    $title = bbp_get_forum_title( $sub_forum->ID );

    echo $link_before . ‘‘ . $title . ‘‘ . $link_after;

    if ($sublist2 = bbp_forum_get_subforums($sub_forum->ID)) {
    echo $before;
    foreach ( $sublist2 as $sub_forum ) {
    // Get forum details
    $permalink2 = bbp_get_forum_permalink( $sub_forum->ID );
    $title2 = bbp_get_forum_title( $sub_forum->ID );

    // Build this sub forums link
    echo $link_before . ‘‘ . $title2 . ‘‘ . $link_after;

    }

    echo $after;

    }

    }
    }

    echo $after;

    ?>

Viewing 1 replies (of 1 total)