Forums
-
- Forum
- Posts
-
- Installation
- 28,399
- Troubleshooting
- 62,334
- Themes
- 10,401
- Plugins
- 15,320
- Requests & Feedback
- 14,934
- Showcase
- 3,254
-
Let’s put that all together – this should work right inside any wordpress template:
<h2>Latest Forum Discussions</h2>
<ul>
<?php
global $wpdb;
$query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_time DESC LIMIT 10";
$results=$wpdb->get_results($query);
foreach ($results as $result) {
echo "<li><a href='/forums/topic.php?id=".$result->topic_id."'>".$result->topic_title."</a></li>";
}
?>
</ul>