bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

limit forums included in latest discussions

(3 posts)
  • Started 1 year ago by atomAstro
  • Latest reply from atomAstro
  • This topic is resolved
  1. I would like to limit the forums being included in the latest discussions section. More accurately, I wish to specifically exclude a forum. Anyone have any ideas on how to do this in the template?

    Posted 1 year ago #
  2. Yup! Find this (or similar) codeblock in your theme's front-page.php.

    <tr<?php topic_class(); ?>>
    	<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
    	<td class="num"><?php topic_posts(); ?></td>
    	<td class="num"><?php topic_last_poster(); ?></td>
    	<td class="num"><small><?php topic_time(); ?></small></td>
    </tr>

    Around it put

    <?php if( $topic->forum_id != 666 ) { ?>
    ... [[that code block]] ...
    <?php } ?>

    You will probably want to change 666 to whatever forum id you actually want to exclude. You can put any conditional logic you like inside those if( ... ) brackets, so for example to filter for two forums you would put if( $topic->forum_id != 666 && $topic->forum_id != 999 ). Hope that helps.

    Posted 1 year ago #
  3. works perfectly.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.