Home › Forums › Add-ons › Repeater Field › Query repeater field with two values › Reply To: Query repeater field with two values
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.