This topic has 2 replies, 2 voices, and was last updated 10 years by talooz.

  • Author
  • #7281
     talooz
    Participant

    Hello,
    1. I am trying to put ads at every 4 users on the shortcode [kleo_top_members].
    i want to count the users and put a banner every 4 or more users. just need to know where do i put my counts ($i++).

    2. is the shortcode [kleo_top_members] paginated? i removed the “max” proprety and now it’s just outputs all the users in one place. I want it to be paginated to make infinte-scroll from it. any ideas how to achieve this?

    help will be much appreciated
    thank you

    #7327
     SQadmin
    Keymaster

    Hi,
    1. You need to modify each:
    while ( bp_members() ) : bp_the_member();
    with:
    $i=0;while ( bp_members() ) : bp_the_member(); $i++;
    if ($i%4 == 0) { echo “MY AD”; }

    2. That is not paginated and doesn’t support infinit scroll

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #7419
     talooz
    Participant

    Thanks!
    I changed the code to look like that, work’s good so far.

    if ( bp_has_members( ‘type=active’ ) ) :
    $count=0;while ( bp_members() ) : bp_the_member();$count++;
    $output .= section_members_li();
    if ($count % 6 == 0) { $output .= ‘<li class=”two columns mobile-two member”>MY AD‘; };
    endwhile;
    endif;

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?