Skip to:
Content
Pages
Categories
Search
Top
Bottom

Howto List the other forums on the forums pages

  • I’m integrating bbPress fairly tightly into an existing site. I use the lefthand sidebar for nav throughout, and I’d love to put the the list of forums in that sidebar. Doing it on the front-page was easy enough, but I can’t get it to work on the forum page.

    Any help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • How did you do it on front-page? I reckon code like this (taken direct from kakumei’s front-page) should work everwhere but I haven’t tried it – if you already have, sorry.

    <?php if ( bb_forums() ) : ?>
    <h2><?php _e('Forums'); ?></h2>
    <table id="forumlist">

    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php while ( bb_forum() ) : ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; // bb_forums() ?>

    If it doesn’t work, chuck <?php bb_forums(); ?> somewhere before it and try again.


    Sam Bauers
    Participant

    @sambauers

    You’ll need to dig into the the index.php file in the root of the code (not a template file). All the prep to retrieve the forums from the database is done there.

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

You must be logged in to reply to this topic.