filtering the search after specific buddypress profile field

Home Forums BP Profile Search Forum filtering the search after specific buddypress profile field

  • This topic has 4 replies, 1 voice, and was last updated 3 months ago by Amtenbrink.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #10907 Reply


    i’m creating an intranet for a big and complex company.

    in buddypress i created custom profile fields, e.g. like departments (living, working, social aid…) in which a member is working.

    because my company is so complex and has a lot of employees, i would like to split the search process in smaller sections.

    i would like to create several search pages which are searching in different ‘categories’ of members. is it possible to restrict / filter each of these pages so that the search on this page is just targeting its respective department?

    thank you very much!

    #10910 Reply

    Hi Amtenbrink,

    Yes, you can do that.

    With BP Profile Search you can create additional member directories with hidden filters, say one for each department, and add to each directory a possibly different search form.

    Make sure to select, for each search form, the correct target directory.

    You can find all the details in the documentation:

    #10912 Reply


    thanks for your reply! but sadly i don’t get it…

    in the documentation for custom directories you write:

    Hidden filters are useful to build specific Members directories. For instance, if you have:

    — a field Gender with ID 35 and values Male and Female
    — a field Status with ID 56 and values Married and Unmarried

    you can build a directory of the married men using the shortcode:

    [bps_directory field_35=”Male” field_56=”Married”]

    But where do i find/set the ID of a field and where do i put in the values?

    Thank you very much!

    #10913 Reply

    To find the ID of a profile field, go to Users -> Profile Fields and click the Edit button of your field. After the edit page loads, you’ll find the field ID at the end of the page URL in your browser’s address bar.

    Let’s suppose that the ID of your Department field is 37. Now you can create a new empty page named “Social Aid Department”, and enter this shortcode in the content area:

    [bps_directory field_37="Social Aid"]

    Save and view the page, and it will show the directory of the members in the Social Aid department. To search this directory, create a search form and select the page “Social Aid Department” as the target directory.

    Hope this helps!

    #10914 Reply

    Oh, perfect!!! Thank you so much 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: filtering the search after specific buddypress profile field
Your information: