Skip to:
Content
Pages
Categories
Search
Top
Bottom

Shortcode


  • Matthias
    Participant

    @matthias70

    I’m using this shortcode on my site.
    [bbp-single-view id=’popular’]
    Is there a way to show only 5 popular threads instead of 10?
    I just tried the following code with no sucess 🙁
    [bbp-single-view id=’popular’ max='5']

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

  • Matthias
    Participant

    @matthias70

    I found this code and can now show five popular entries on my frontpage 🙂
    // Top five of bbpress on startpage
    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’ );

    Thanks
    Matthias


    Matthias
    Participant

    @matthias70

    Now I’m trying to hide the pagination of the output

    My startpage has the page ID 35
    I’m trying to use this css to hide the pagination only on the startpage
    .page-id-35, a.page-numbers, .page-numbers.current, .page-numbers.dots, .bbp-pagination-count {display:none!important;}

    The css works fine, but the addition .page-id-35 does not work
    Does anyone see an error?
    Thanks
    Matthias

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