Forums
-
- Forum
- Posts
-
- Installation
- 26,490
- Troubleshooting
- 56,885
- Themes
- 9,881
- Plugins
- 14,469
- Requests & Feedback
- 14,169
- Showcase
- 3,222
-
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>
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS