Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


_ck_
Participant

@_ck_

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>

Skip to toolbar