Skip to:
Content
Pages
Categories
Search
Top
Bottom

more than 50 topics on the front page


  • Clivesmith
    Participant

    @clivesmith

    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

    @robin-w

    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

    @clivesmith

    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

    @robin-w

    I’ll take a further look tomorrow


    Robin W
    Moderator

    @robin-w

    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

    @clivesmith

    sorry, no, still not working


    Robin W
    Moderator

    @robin-w

    where are you putting this function ?


    Clivesmith
    Participant

    @clivesmith

    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

    @robin-w

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


    Clivesmith
    Participant

    @clivesmith

    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

    @clivesmith

    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

    @robin-w

    // 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

    @clivesmith

    once again, brilliant thank you, thank you


    Robin W
    Moderator

    @robin-w

    no problem


    andreasyeah
    Participant

    @andreasyeah

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


    Clivesmith
    Participant

    @clivesmith

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


    andreasyeah
    Participant

    @andreasyeah

    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