BuddyDev

Search

[Resolved] BFM Issue with pagination

  • Participant
    Level: Initiated
    Posts: 11
    Nabeel Tahir on #15914

    Hello, guy, I am facing a little problem with BuddyPress Featured Member plugin I have added some members as a featured.

    I have added a widget in footer. Problem is that when I am in members page featured member list show but when I go to next page though members pagination footer Featured members also change to remove featured members pagination

  • Participant
    Level: Initiated
    Posts: 11
    Nabeel Tahir on #15915

    Please have a look into :
    https://www.taagme.com/dev/members/

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #15927

    Hi Nabeel,
    Thank you.
    Since we use the members loop, It does get affected. I will put a fix about pagination today/tomorrow.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    Nabeel Tahir on #15983

    Kindly update us about the pagination if it has been fixed or not
    SO we can continue our work

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #15984

    Hi Nabeel,
    I am sorry but we won’t be able to include the fix in the plugin. Since it only happens on members directory, We can think of as a regression.

    I will explain why.

    The problem:- We use bp_has_members() the same loop that BuddyPress uses on member directory. BuddyPress does not have a proper way to pass the pagination arguments. It uses the “page_arg” variable to keep the name of the pagination query string variable name. That is a super bad choice as it limits the customization.

    If we change the ‘page_arg’ in our loop, We will be able to work with BuddyPress’s loop but that will break pagination for us on our shortcode pages.

    In your case, Please open bp-featured-members/templates/members-loop-list and members-loop-slider

    You will see a line like this

    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&scope=featured') ) : ?>
    

    Please change it to

    
    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&scope=featured&page_arg=somethingrandom') ) : ?>
    

    That should fix it.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    Nabeel Tahir on #15994

    Awesome man thanks.
    Its Woking now 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #16013

    You are welcome. Marking as resolved.

The topic ‘ [Resolved] BFM Issue with pagination’ is closed to new replies.

This topic is: resolved