Skip to:
Content
Pages
Categories
Search
Top
Bottom

more than 50 topics on the front page

  • @clivesmith

    Participant

    I want to show more than 50 topics on a forum on the front page, if I click on the forum it will list more than 50 but only 50 show up on the front page,
    Hope this makes sense, if you look at my site (wateratairports.com) Vietnam is not on the front page but if you click on “Countries” it is at the end.

    I found the following but that does not work.

    // filter to show more than 50 forums on the index page
    function bbp_increase_forum_per_page( $args = array() ) {
    $args[‘posts_per_page’] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘bbp_increase_forum_per_page’ );

    I have bbp style pack and under forum display there is a line 11. No. Forums Per Page
    Default : 50 I have changed that to 100 but that does not seem to work either.

Viewing 16 replies - 1 through 16 (of 16 total)
  • @robin-w

    Moderator

    without testing, I suspect this will work

    // filter to show more than 50 topics on a forum
     function bbp_increase_topic_per_page( $args = array() ) {
     $args[‘posts_per_page’] = 100 ;
     return $args;
     }
     add_filter( ‘bbp_before_has_topics_parse_args’, ‘bbp_increase_topic_per_page’ );

    @clivesmith

    Participant

    Hi Robin,
    Thanks but that does not work,

    Also I have changed the line 11 in bbp style pack as above back to default it knocks the list under Countries back to 50 so not including Vietnam.

    @robin-w

    Moderator

    I’ll take a further look tomorrow

    @robin-w

    Moderator

    ok,try this- same code but different “‘” !!

    // filter to show more than 50 topics on a forum
     function bbp_increase_topic_per_page( $args = array() ) {
     $args['posts_per_page'] = 100 ;
     return $args;
     }
     add_filter( 'bbp_before_has_topics_parse_args', 'bbp_increase_topic_per_page' );

    @clivesmith

    Participant

    sorry, no, still not working

    @robin-w

    Moderator

    where are you putting this function ?

    @clivesmith

    Participant

    In the child theme functions.php, I have tried it on its own in case another function is messing with it but it still does not work. Thanks for your help

    @robin-w

    Moderator

    hmm – can’t really suggest what is going wrong, works on my test site

    @clivesmith

    Participant

    OK thanks, I have tried deactivating nearly all the plugins just left bbpress / style pack and it is still the same, also as I said chopped the functions file.

    @clivesmith

    Participant

    doh sorry just realized why it does not work, it is not the topics but the sub forums that are only showing 50.

    @robin-w

    Moderator
    // filter to show more than 50 sub forums on a forum
     function bbp_increase_subforums_per_page( $args = array() ) {
     $args['posts_per_page'] = 100 ;
     return $args;
     }
     add_filter( 'bbp_before_forum_get_subforums_parse_args', 'bbp_increase_subforums_per_page' );

    @clivesmith

    Participant

    once again, brilliant thank you, thank you

    @robin-w

    Moderator

    no problem

    @andreasyeah

    Participant

    where can i paste this code? i have the same problem

    @clivesmith

    Participant

    I put it in the functions.php file in my child theme

    @andreasyeah

    Participant

    perfect!!! it works!

    Thank you very much

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