Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › 2 Sets of Filters in One Search Bar
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 9 months ago.
- AuthorPosts
- June 14, 2021 at 1:24 pm #33651
Hi,
Im hoping to create a search bar with 2 sets of filters, is this possible? If so, how do I set it up?
For example, I would like my website users to be able to filter their search results by year and country of origin. Right now I just have the ability to search by country of origin. However, I would like my users to be able to further refine their search results by year (ex/ results from Canada in the year 2019).
Thanks for your help!
-Alison
June 15, 2021 at 12:53 pm #33659Hi Alison,
Depending how the date is stored you have multiple options. If the date is the actual post publish date, you can use the date filters. If it is a custom field value, you can use a custom field date filter as well.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 25, 2021 at 3:10 pm #33774Hi Ernest,
Is it possible to have filters that would work for 2 types of content (i.e. not dates)? I would like my users to be able to filter their search results by country and topic. As of now, I have added categories to every page that specifies the country and topic of every page but I only have filters set up for the countries and I would like to add the topics too (i.e. so that my users could filter their results to a specific country and a specific topic only), is this possible?
Thanks,
Alison
June 27, 2021 at 8:30 am #33778Hi Alison,
Basically, you can have a set of filter for each taxonomy – like post categories, post tags, product categories etc..
Best,
If the Country and the Topic were stored in sperate taxonomies, then it is possible to have one filter for the country and one for the topic.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 28, 2021 at 2:08 pm #33784Hi Ernest,
Which taxonomies would I use? I only see post – category (Categories) and post – post_format (Formats) as options and post_formats does not work for what I am trying to do. Is it possible to add another taxonomy for a different set of categories?
Thanks,
Alison
June 29, 2021 at 9:32 am #33788Hi Alison,
Well, the taxonomies first need to be created before you can add items to them. The best way is to add them programmatically, but some plugins can assist with that. I usually link this guide, it explains it in details.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.