Skip to:

bp_has_members() function parameters

  • susivegan


    I need to have a members list in members directory (and so in profile search results for which I’m using BP Profile Search plugin) ordered by “popular”. I din’t find any plugin to do it. But I had a look at and I see:

    Accepted Parameters
    The bp_has_members() function will accept a number of parameters that will manipulate the data being returned.
    type optional – Defines the type of users to return.
    Accepted arguments: active, newest, popular, online, alphabetical, random
    Default value: active

    So I think that I have to add “popular” to default types (last active, latest registered) and set it as default value.
    I don’t know PHP, just HTML, so I really don’t Know what I have to Write and where.
    Could anybody help me please?
    It would be really very important to me!
    Thank you very much!
    I’m using WordPress 3.4.2 and Buddypress 1.5.6

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

  • modemlooper


    if( bp_has_activities( 'type=popular' ) )



    Thank you so much, I’m going to try and put this line at the beginning of members-loop.php inside Buddypress default theme folder:

    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) ) ) : ?>

    which become

    Is it correct?
    Do I have to do something in the function.php file too?

    Thank you very much, I still have to learn everything!




    I tried to change members.loop in default theme (I?m using BP Column)
    I substituted this string

    with this
    if( bp_has_members( ‘type=popular’ ) )
    but when I lokked at the site and tried to have All members page it restituted me this error:
    Parse error: syntax error, unexpected T_ELSE in /home/terrenoi/public_html/ on line 105

    Maybe I have to put this string somewhere else?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘bp_has_members() function parameters’ is closed to new replies.
Skip to toolbar