Skip to:
Content
Pages
Categories
Search
Top
Bottom

New topics

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    not available in bbpress, so would require code, so might as well be a plugin !


    Barry
    Participant

    @barryhughes-1

    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


    hughb1
    Participant

    @hughb1

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar