I would like to do a filter that will hook to the main query and filter all the posts by some given taxonomy terms or custom fields. For now I have made the custom filters for the $query to only select the posts that have a custom value for certain taxonomy as follows:
foreach($data as $taxonomy => $terms): $query->set($taxonomy,$terms); endforeach;
and this solves it. But for example, I am having the following issue: I don't see how to provide instead of a taxonomy field, a custom field that has the value in a range; For example price is between 500-1000; where price is a custom field.
I have tried anything I could and searched a lot on the codex but I can't figure it out.