Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Creating & Extending

Existing and new plugins/components and themes.

Limit Activity (loop) (3 posts)

Started 8 months ago by: linusf

  • Profile picture of linusf linusf said 8 months ago:

    Is there a way to limit the amount of activities in the loop before showing the “load more” button?

    My current page uses activity feed on the homepage. And with alot of Youtube embeds etc the site is loading slower then necessary, and it makes the homepage unnecessary long in terms of scrolling. I would like to cut the amount by maybe half, and force my users to push the “load more” button to extend the page downwords.

    Is this possible and how do I do? :)

    (At the moment I’m stuck with Bp1.2x but I’m changing soon hopefully)

  • Profile picture of modemlooper modemlooper said 8 months ago:

    Look in the activity loop php file. Find this code and add a per page parameter. Default is 20.

    <?php if ( bp_has_activities( 'per_page=10') ) : ?>

  • Profile picture of linusf linusf said 8 months ago:

    Cool thanks!