Forums
-
- Forum
- Posts
-
- Installation
- 28,380
- Troubleshooting
- 62,253
- Themes
- 10,391
- Plugins
- 15,313
- Requests & Feedback
- 14,907
- Showcase
- 3,252
-
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; ?>
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS