Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


_ck_
Participant

@_ck_

Since bbPress-Live also does a list of forums, here’s how to do that too:

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

of course this example doesn’t take into account nested forums and will just display them flat.

Skip to toolbar