Support Forums

Support Forums Forums Search & Filter Pro Multiple filters on one BB posts module

This topic is: not resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Edward Parker

    I successfully added a S&F filter to a Beaver Builder posts module, and it works well. Now, I want to have additional search options for the same posts module.

    Description: I’m working on a hotel site. I currently have a slider to filter based on price (selecting from a Field Group A number field), but I would like to add two more filters: one for room amenities (selecting from Field Group B radio button fields), and one for extras (selecting from Field Group C radio button fields).

    All these filters should work together to provide results from the same pool of rooms. Is this possible with BB, or must I do it in PHP?

    Trevor Moderator

    There is no reason you cannot add these to your existing search form (you can have only one form, but it can have multiple fields) as long as you have a separate data source for each of these facets you need to filter on. The filter fields will work together, so, for example, you could search for a hotel that has balconies and one that has a sea view, provided. I would have suggested that Room Amenities be a checkbox field to allow multiple choices, and maybe the same for the extras field.

    Edward Parker

    Thanks Trevor, that makes perfect sense. Unfortunately, despite having tried many settings combinations, I haven’t got it working yet. I want it to work like your “Movies” demo:

    My fields are defined using ACF. When you say “one form, but it can have multiple fields”, do you mean that I should use multiple “Post Meta” fields (ie: one for “Swimming Pool”, one for “Kitchen”, etc.)? If I choose “Automatically” under “get options”, it works, but on the page I see a Bicycle Rental heading with both “Yes” and “No” boxes under it:

    If I change it to “Manual” and set “Value” to “Yes and “Label” to “Bicycle Rental”, it displays better, but doesn’t actually filter correctly.

    If I’m using one Post Meta field for all amenities, what meta key should be used? If I use different Post Meta fields for each amenity, how I make them organise like in screenshot A?

    No doubt I’m close, but some logic is eluding me. I’m gladly read some more detailed documentation if any is available.



    Trevor Moderator
    This reply has been marked as private.
    Edward Parker
    This reply has been marked as private.
    Trevor Moderator
    This reply has been marked as private.
    Edward Parker

    Hi Trevor:

    Thanks very much for looking and replying. You are indeed right – I started out with room_rate and later changed it to nightly_rate, but forgot to change it in the form. I should have noticed that!

    While that was a problem, it wasn’t actually what I was struggling with though (which was trying to get amenities such as bicycle, swimming pool, etc. under a single heading). However, thanks to you getting me to thinking differently about my ACF fields, I figured it out.

    The trouble was, I had each of my amenities in ACF as a separate field within a field group, where I should have had them all as options within a single field in a field group. Once I made that change, it worked correctly.

    But of course, if you hadn’t pointed out the other problem that I didn’t know I had, I wouldn’t have succeeded at the field change.

    Thanks for you help – I greatly appreciate it!


    Edward Parker

    Actually – one more question, if I may (there’s always another…):

    With checkboxes, can I add to my form a “toggle all” (on or off) option?

    Trevor Moderator

    Great that you got that sorted, and, no, there isn’t a simply way to toggle them all off, sorry.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.