Support » Plugin: Relevanssi - A Better Search » Multiple search terms from dropdowns?

  • I have a custom field group of ‘producers’, which refers to food producers. This group has categories like ‘meat-and-poultry’, ‘eggs-and-dairy’, etc. One of the custom fields in the group is ‘county’. I would like to create a search option that allows users to select a category and a county from two separate dropdown menus. So, for example, they will see, “Show me all ______ producers in ______ County.” In place of each blank would be a dropdown showing possible choices. They would select one from each and click Search. Can I do this in Relevanssi, and if so can you please point me in the right direction to research how to do it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That’s not a search as such, that’s just browsing by custom field. Relevanssi is not the best tool for that. Relevanssi is best used for free-text searches, where user types a search query that is then used to find posts.

    You do not need a specific plugin for something like this. It can be done with WP_Query, which is a core feature in WordPress. Just take the parameters and compile them into a meta_query for WP_Query. This is something any WP developer worth their salt should be able to do without problems.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.