BuddyDev

Search

Load more button with activity stream shortcode

  • Participant
    Level: Initiated
    Posts: 3
    Lucia on #10415

    Hello
    I’d like to use the activity stream shortcode to create different blocks of 3 activities each, like this
    [activity-stream max=3 per_page=3 title=0 pagination=0 page=1st]
    [activity-stream max=3 per_page=3 title=0 pagination=0 page=2nd]
    [activity-stream max=3 per_page=3 title=0 pagination=0 page=3rd]

    They work very well, but I’d like to add the BUTTON LOAD MORE to the last block – the 4th page.

    I tried with this code
    [activity-stream title=0 per_page=3 page=4th load_more=1]
    The BUTTON LOAD MORE actually displays, but, once clicked, it messes up the previously posts. Sometimes, it loads the same posts more than once, sometimes not.

    It is strange because if I use this last code alone
    [activity-stream title=0 per_page=3 page=4th load_more=1]
    meaning that I delete the previous codes of the 1st, 2nd and 3rd pages, It works perfectly well. In fact, it displays the 4th page and the LOAD MORE BUTTON works well, loading the previous posts without any messing up.

    I hope I explained myself well!

    Best,
    Lucia

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #10427

    Hi Lucia,
    My apologies for the inconvenience.

    The problem is BuddyPress does not support load more/ajax pagination for multiple item loops on the same page. In this case, clicking load more will update all your loops on current page.

    If you want multiple loop with load more(on same page), you will need to add your own custom loader. The default BuddyPress implementation will not work.

    this plugin does not add any new js, it simply uses the one included with BuddyPress/your theme.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved