Custom bbPress Loop

You can call bbPress items the same way you call normal WordPress custom post types… like this
        <?
	$new_args = array(
		'post_type'=> 'topic',
	);
	
	$nest_query = new WP_Query( $new_args );
	
       if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_content(); ?>	
         			            
         <h1><? echo $this_post_title; ?></h1>
         <div class="the_content"><? echo $this_post_content;</div>
			            
       <? endwhile;
       endif; 
       ?>
The three post types are forum, topic, and reply. If you are calling the topics then at the end of the topics list you can call the “Start New Topic Form”
<? echo do_shortcode('[bbp-single-forum id=54]'); ?>
Comments