I don’t have a concrete example of the second method, basically because I would never to it that way. It far too complicated and too much work to achieve.
I would use the first method and create an acf/save_post action. In this action I would loop through the repeater and create another custom post meta field that is a concatenation of the two fields I want to search. I would then do my WP_Query based on this new field that is stored in standard WP fashion. I know that this seems like it’s coming at the problem backwards, but it’s really the easiest way.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.