Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Here’s how to show bbPress info inside WordPress without full integration


chandersbs
Member

@chandersbs

How exactly can I exclude some forums for showing up in this code, that generates a list of forums, or rather, HOW can i show only selected forums?

<?php if ( $topic ) : ?>
<h2>Forum List</h2>
<ul>
<?php
global $bbdb;
$query="SELECT * FROM bb_forums WHERE topics!=0 ORDER BY forum_order ASC LIMIT 10";
$results=$bbdb->get_results($query);
foreach ($results as $result) {
echo "<li><a href='/forum.php?id=".$result->forum_id."'>".$result->forum_name."</a></li>";
}
?>
</ul>
<?php endif; ?>

Skip to toolbar