2 Sets of Filters in One Search Bar

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 Ernest Marcinko 2 years, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33651
    alisonhanson26
    alisonhanson26
    Participant

    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

    #33659
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #33774
    alisonhanson26
    alisonhanson26
    Participant

    Hi 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

    #33778
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Alison,

    Basically, you can have a set of filter for each taxonomy – like post categories, post tags, product categories etc..
    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #33784
    alisonhanson26
    alisonhanson26
    Participant

    Hi 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

    #33788
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


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

You must be logged in to reply to this topic.