Hey Ernest & team.
I would like some guidance on the best practices for setting up some custom filters. If you could help us with some basic structures of how to best achieve what what need, that would be super helpful.
Index:
Our index is of all media items, but filtered to only index items with an ACF value of true for a field called available, you have helped set this up with another ticket. I am indexing all the ACF fileds that we need for the following filters. These fields are:
– artistID
– price
– size_height
– size_width
Filters:
We have to create 3 filters programatically, as they are custom, but if theres a way to do them another way, please let me know. I have hacked together some of them with LLM code, but I would rather build from scratch with your help.
I noticed that if I didnt add and hide at least one filter in the UI, these new ones wouldnt show at all, so we do this, but seems clunky?
Filter 1 – Artist name (kinda working but hacky)
– each artwork should have an ACF artist_id field
– we need to collate the artist list that has available works list, build a checkbox list, and then filter to just show artworks available from that artist
Filter 2 – Price range (kinda working but hacky)
– each artwork has a price, and we have a preset list of price ranges to limit results to certain ranges
Filter 3 – Size
– each artwork has a height and width
– we want to have two range sliders where someone can set the min/max size, and then click to apply the filter to the results
If you could offer some help in getting these set up a proper way, that would be amazing.
Thanks everyone.