Default Search by Alphabetical order

Home Forums BP Profile Search Forum Default Search by Alphabetical order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4577 Reply
    Erik
    Guest

    Hi, Andrea, first of all your plugin its great!
    Im trying to set the Alphabetical order search as default(in template and widget), and remove the option to change that (active,newest,alphabetical). So when the user start a search allways find other in Alphabetical order and not just the active users for example. And remove the advanced search . I canĀ“t find the correct place with the sql “filter” or the “option” template part.
    Thanks in advance!
    IMG-search

    #4578 Reply
    andrea
    Keymaster

    Hi Erik,

    You can do the following:

    1. To set the alphabetical order, modify

    /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    replacing line 27:

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

    with:

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

    2. To remove the order selection, modify

    /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php

    removing lines 76 through 95:

    <li id="members-order-select" class="last filter">
    ...
    ...
    </li>

    3. To remove the BP Profile Search form from the Members directory, edit that form and select Add to Directory: No

    Please let me know if that works for you!

    #4581 Reply
    erik
    Guest

    Its work like a charm !!
    It took me a little to find the corret php files because im using a diferent template, so the files that you point me are in a diferent place.

    Thanks Andrea!!

    #4593 Reply
    andrea
    Keymaster

    You are welcome, I’m glad you succeeded!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Default Search by Alphabetical order
Your information: