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?
bbPress support forums » Themes
limit forums included in latest discussions
(3 posts)-
Posted 1 year ago #
-
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
666to 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 putif( $topic->forum_id != 666 && $topic->forum_id != 999 ). Hope that helps.Posted 1 year ago # -
works perfectly.
Posted 1 year ago #
Reply
You must log in to post.