This is how you do it for WordPress posts:
$my_query = new WP_Query( "cat=3" );
if ( $my_query->have_posts() ) {
while ( $my_query->have_posts() ) {
$my_query->the_post();
the_content();
}
}
wp_reset_postdata();
I would like to know how to do that in bbPress (say, listing topics).
bbpress has its own query class called BB_Query()
and it accepts:
@janoChen – The exact same method can be used to get bbPress forums/topics/replies, as well as there being a few built in functions that act as wrapper functions for them.
If you can reply back with exactly what kind of information you’re trying to get, I can show you how to build the query. (I.E. you want the 14 most recent public topics, you want the most recent 25 replies by user_id 7, etc…)