- This topic has 4 replies, 1 voice, and was last updated 3 weeks, 5 days ago by Amtenbrink.
September 2, 2020 at 1:04 pm #10907AmtenbrinkGuest
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!September 3, 2020 at 11:03 am #10910andreaKeymaster
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:September 4, 2020 at 6:51 am #10912AmtenbrinkGuest
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!September 4, 2020 at 10:13 am #10913andreaKeymaster
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!September 4, 2020 at 10:18 am #10914AmtenbrinkGuest
Oh, perfect!!! Thank you so much 🙂