I'd like to filter by Custom Fields, my goal is to have links with url parameters like:
domain.com/?custom_field=white
I think i can create the custom query by tweaking this examples: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/
But how can i put all together in a site plugin or functions.php so when someone clicks my URL parameter it actually runs my query? I can't seem to find the answer to that step.