It seems that content-single-forum.php is the template to over-ride.
So do I have to pass in WP_Query meta_query args to bbp_has_topics() ?
I’d like to only gather the appropriate topics, so using the supplied apply_filters
apply_filters( 'bbp_has_topics', $bbp->topic_query->have_posts(), $bbp->topic_query );
seems inefficient.
Or is there an easier way?
This seems to work – there may be a better way…
In an over-ride of content-single-forum.php, do something like this:
if ( // some condition ) {
$my_r['meta_query'] = array(
array(
'key' => 'my_key',
'value' => 'my_value',
'compare' => '=',
)
);
}
else
$my_r = '';
Then change bbp_has_topics() to bbp_has_topics( $my_r )