Hi!
I’m trying to add a feature to the twenty-twenty theme, to let the user search by inputing keywords, categories and/or tags. The goal is to give the maximum amount of control to the search, allowing for multiple selection of categories/tags and so on.
I’m using a fresh install, changing only the source API (to jsnation2020’s) and menu’s items:
Live: https://frontity-search.vercel.app
Github: https://github.com/arieltonglet/sandbox-frontity-search
By wordpress defaults I would add parameters to the URL, like:
https://frontity-search.vercel.app?cat=6&s=this
My first attempt by just typing this on address bar reflected on the category param appearing on state.source.data.query:
But it returned the same 32 items that will pop if I search only by the keyword. So, the “cat” param, although being present, is not reflecting on results.
I’m using jsnation2020.frontity.org
as source for this data, and to be sure is wasn’t some error with the query I checked navigating to https://jsnation2020.frontity.org/?cat=6&s=this , which gives the result I desire: only 8 items, filtering both by keyword as by category.
I am a bit lost on how to tackle this. It seems to me that I should be doing some routes customization, but I’m not sure where or how to start that (or even if Frontity allows that)
Thanks in advance!