Default sort by

BP Profile Search › Default sort by

  • Author
    Post
  • #9417 Reply
    Squid
    Guest

    Hi,

    Thank you for this plugin.
    I try to configure it for my use and I am stuck with a little problem.
    I would like the results to sort by alphabetical, by default.
    I found a clue in a previous thread, but changing the file (something like « member loop ») had no effect as it srayed sorting by activity by default.
    I find something in another thread to change the file by making a « theme folder », in order to keep this change even when BP is updated. That would be great to make that way.
    Thank you for reading 🙂

    #9418 Reply
    andrea
    Plugin Author

    Hi Squid,

    You can follow the tutorial ‘E)’ in:

    http://dontdream.it/bp-profile-search/custom-directories/

    and when it says ‘4. Modify the new files… ‘ do the following:

    1. Open members-loop.php and locate the line:

    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>

    2. Replace it with:

    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ). '&type=alphabetical' ) ) : ?>

    Done! Please note that the above procedure forces the alphabetical sorting, no matter what the user selects in the ‘Order By:’ drop-down, so you may want to remove that selection altogether.

    #9425 Reply
    andrea
    Plugin Author

    As a follow-up to the previous post, if you wish to remove the ‘Order By:’ drop-down, add the following step.

    3. Open index.php, then locate and remove this block of lines (20 lines in total):

    <li id="members-order-select" class="last filter">
    ...
    ...
    </li>
    #9426 Reply
    Squid
    Guest

    Hi Andrea,

    Thank you for your answers, I will try again with your tips.
    I come back as soon as possible to give you my feedback.

Reply to: Default sort by
My Information