No Replies Widget – [bbp-single-view id=’no-replies’]?
-
I want to switch the Top Five Topics widget on my site to a Topics With No Replies widget.
I think I’ve found the code referring to the Top Five Topics widget in functions.php – this looks like it:
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 I think this is the relevant code on the page where the widget is displayed:
[bbp-single-view id="top-five"]According to https://codex.bbpress.org/features/shortcodes/ the code for No Replies is:
[bbp-single-view id=’no-replies’]So I’m guessing that on the page I just need to replace top-five code with no-replies…?
But what about the code in functions.php?
I found this on github:
bbp_register_view(
‘no-replies’,
__( ‘Topics with no replies’, ‘bbpress’ ),
apply_filters( ‘bbp_register_view_no_replies’, array(
‘meta_key’ => ‘_bbp_reply_count’,
‘meta_value’ => 1,
‘meta_compare’ => ‘<‘,
‘orderby’ => ”
)
) );
}Is this what I need? Or should it start with function like the current code I posted at the top?
Please excuse me if I’m missing something obvious here – I’m just the website owner, not a developer.
Thanks in advance 🙂
- You must be logged in to reply to this topic.