add this to your child theme functions.php or a functionality plugin.
function rk_top_five_view() {
bbp_register_view( 'top-five', __( '5 Most Popular Topics' ), array(
'meta_key' => '_bbp_reply_count',
'posts_per_page' => '5' ,
' max_num_pages' => '1',
'orderby' => 'meta_value_num' ),
false );
}
add_action( 'bbp_register_views', 'rk_top_five_view' );
and then add this to your page.
[bbp-single-view id="top-five"]
Thanks alot.
it’s exactly what i needed.
but why does is show me also pagination?
when I click to the next page it goes to some post at the site..
@dc4x_admin
I will test it out a bit more
@robkk
Did you find anything?
I still dont understand it…
@dc4x_admin
I found something awhile ago , sorry I forgot about this topic.
i cannont seem to find the code i used though.
But you can just use this plugin instead , it should do the same thing.
https://wordpress.org/plugins/bbpress-popular-topics/
The shortcode is something like this for that plugin.
[bbpresspopulartopics qty = 5]
Robkk
The above listed plugin plugin no longer works.
Your code to register a top five works however the resulting page output from this snippet includes breadcrumbs, viewing x topics, and pagination. The pagination also links to spurious pages.
What is required to style the output page so that it does not include breadcrumbs, viewing x topics, or pagination?
Kind Regards
Max