Support » Plugin: BP Profile Search » Button to clear all filters/selections?

  • Resolved strike3

    (@strike3)


    Hi,
    First off, thanks for the fantastic plugin! Our members love being able to filter through the list and find people with similar interests, folks in their area, etc.

    I was wondering if it would be possible to have a button next to the Search button that would clear all the current filters? The issue is that after someone has done a search and/or filtering, it can be a little difficult for them to get back to the full, unfiltered member list. Right now, they can CTRL+click (on Windows) to clear one of the multi-select filters, but not everyone knows to do that.

    Thanks for considering!

    Matt

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Matt,

    Probably the simplest way to get back the unfiltered Members directory is to click the Clear link under the active filters list in the search results page.

    Anyway I agree that a button to clear the filters in the search form can be useful, and I’m adding it to my to-do list. Thank you!

    Thread Starter strike3

    (@strike3)

    Hi Andrea,
    Thanks for the reply! For some reason, I’m not seeing the Clear link on the search results page. Here are the settings I’m using:

    Form Method: Get
    Form Action: Members
    Add to Directory: No
    Form Template: members/bps-form-sample-2
    Toggle Form: Enabled
    Toggle Form Button: Hide/Show Form

    Do I maybe need to switch to a different template to get the Clear link?

    Thanks again for your help!

    Matt

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Matt,

    If you look at this screenshot:

    https://ps.w.org/bp-profile-search/assets/screenshot-5.png

    the Clear link is in the first of the three red boxes.

    It doesn’t depend on your settings, probably it could depend on your theme. Which theme are you using?

    Thread Starter strike3

    (@strike3)

    Hi Andrea,
    Thanks for the screenshot, that really helps. It looks like there were customizations done at some point to remove the standard Buddypress content that is normally above the member listing–Order By, the other search box, the All Members dropdown. Is the Clear results section hooking into a Buddypress functions or looking for a specific div? Since I’ve got a better idea of how this happened, I’ll play around with it and see if I can get it to show up again. Thanks again for your help!

    Matt

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Matt,

    You need the action hook bp_before_directory_members_content.

    It’s in the file:

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

    and the line is:

    <?php do_action( 'bp_before_directory_members_content' ); ?>

    Thread Starter strike3

    (@strike3)

    Hi Andrea,
    Wow, thank you so much for the amazing support. I added that action hook back into the custom member index template and now it’s working great.

    I’d be happy to make a donation toward the plugin if there’s a way to do that (didn’t see a link on the main page).

    Thanks again!

    Matt

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Matt,

    Thank you for your offer, at this moment I don’t have a donation link active, but I really appreciate the 5 stars review you just published!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Button to clear all filters/selections?’ is closed to new replies.