not available in bbpress, so would require code, so might as well be a plugin !
Something like this ought to do the trick:
function bbp_add_recent_activity_view() {
bbp_register_view(
'active',
'Active topics',
array(
'meta_key' => '_bbp_last_active_time',
'meta_type' => 'DATETIME',
'meta_compare' => '>=',
'meta_value' => date_i18n( 'Y-m-d H:i:s', strtotime( '-1 day' ) ),
'max_num_pages' => 1,
'orderby' => 'meta_value_num',
'show_stickies' => false
)
);
}
add_action( 'bbp_register_views', 'bbp_add_recent_activity_view' );
With this in place you should then be able to access a list of ‘active’ topics at:
example.com/forums/view/active
In terms of where to add this sort of code, there are a few options. One would be to create a new PHP file (starting with a <?php
opening tag) at:
wp-content/mu-plugins/bbpress-tweaks.php
I really appreciate the feedback thank you! However I’m keen to keep things as easy to manage as possible with a minimum of customisation. Is there a way I can submit this as a feature request?
Is there a way to structure this so new views can apply to individual forums, too?