Forums Forums Search & Filter Pro Create custom search fields for custom sort order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #151870

    Hi,
    I use S&F Pro in combination with Relevanssi.

    For very special search features I want to create two new search fields.
    One for setting a location, helping to find local results,
    and one for setting personal preferences .

    I can code the logic of the two new search fields myself.

    What is the best way for creating these fields and filling them with options?
    String values are enough, the additional logic comes in later.
    I want to show these options similar to the other search fields in my search form.

    What is the best way for passing these options to relevanssi? Relevanssi plugins will do the additional sorting.

    Many thanks in advance,
    Elisabeth

    Trevor
    #151912

    To create the fields I would use the free Advanced Custom Fields plugin. Then, you add values in the posts. In the Search & Filter form, you would then add a Post Meta element to the Form UI, and select the Meta Key. With ACF, note that it makes 3 meta keys per field, like this:

    #1 _location
    #2 field_5a16902ae5c07
    #3 location

    You need to use key #3, without the underscore at the start of the key name.

    Anonymous
    #151929

    Hi Trevor!
    Many thanks for your fast reply.

    This quick and easy solution is however not enough for me.

    With location for example, I want to show the products closest to the user location. Simply selecting a value of ACF cannot do this logic, because the user would have to check several ACF values himself.

    Is it possible to expand the current plugin?
    This takes time, but if the quote is reasonable I am happy to pay for that.

    Best wishes,
    Elisabeth

    Trevor
    #151933

    Ah. I understand. You need geolocation. That is not a current feature, but is on our list to look at for V3.

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