Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Display WP Blog Posts on Forum

Why don’t you just make a sql query ? If you have both WP & BB in the same database it should be easy. Something like:

$blog_posts = $bbdb->get_results("SELECT FROM wp_posts WHERE post_status = 'publish' ORDER BY post_date DESC LIMIT 10");
echo '<ul>';
foreach ($blog_posts as $post)
printf('<li><a href="/?p=%i">%s</a></li>', $post->post_ID, $post->post_title);
echo '</ul>';
unset($blog_posts);

Of course this has errors, i made it without looking ad the db fields. Also, is it get_results or get_rows? I forgot :p

Skip to toolbar