Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


_ck_
Participant

@_ck_

Both bbPress and WordPress have a very simple way of fetching data.

WordPress uses $wpdb

bbPress uses $bbdb

(the db part means database, very simple)

Then there’s the good old “get_results”. They both use that.

bbpress:

$results=$bbdb->get_results("mysql query goes here");

wordpress:

$results=$wpdb->get_results("mysql query goes here");

Many times you can use the same query in either bbpress or wordpress by just changing $bbdb to $wpdb or visa-versa.

Then you have to figure out what you are asking for.

Let’s use the really simple bbPress Topics table as an example. Unless you’ve customized your install, the Topics table is probably called bb_topics

Here are all the fields available inside of bb_topics.

topic_id
topic_title
topic_slug
topic_poster
topic_poster_name
topic_last_poster
topic_last_poster_name
topic_start_time
topic_time
forum_id
topic_status
topic_open
topic_last_post_id
topic_sticky
topic_posts
tag_count

Skip to toolbar