Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Display only 5 recent topics and show certain forums?

@inspirationally

Participant

Found out –
you can simply use Widgets inside your template.

I also installed the tehnik-bbpress-permissions plugin to not show the hidden forums topics and put this into my template:

<?php the_widget( 'Tehnik_BBP_Replies_Widget', $instance, $args ); ?> 

This should work with the default BBP Replies Widget, too (just need to find out the name of it)

Will try a bit more customization today with an eye on https://codex.wordpress.org/Function_Reference/the_widget

Another possibility is manually:

	<?php do_action( 'bbp_template_before_topics_index' ); ?>

        <?php if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) ) : ?>
                <?php bbp_get_template_part( 'bbpress/loop', 'recent-topics' ); ?>
        <?php else : ?>
                <?php bbp_get_template_part( 'bbpress/feedback', 'no-topics' ); ?>
        <?php endif; ?>

	<?php do_action( 'bbp_template_after_topics_index' ); ?>
Skip to toolbar