Skip to:
Content
Pages
Categories
Search
Top
Bottom

Limit the amount of topics shown from content-single-view


  • vincenzon617
    Participant

    @vincenzon617

    Is there a way to limit the number of topics shown when using the shortcode [bbp-single-view id=’popular’]?

    I would only like to show the top 10 most popular topics.

    Thanks

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

  • Robin W
    Moderator

    @robin-w

    untested, but try

    add_filter( 'bbp_get_view_query_args', 'rew_limit')
    
    function rew_limit ($args) {
    $args['posts_per_page'] = -1 ;
    $args['posts_per_page'= 10 ;
    return $args ;
    }

    not sure which 10 it will show!!


    vincenzon617
    Participant

    @vincenzon617

    Works great thank you!

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