Home › Forums › General Issues › WP_Query … condition statements … now getting trim errors… › Reply To: WP_Query … condition statements … now getting trim errors…
I’ve found a “round-a-bout” way to do this… I run the query without the banner_cats and banner_towns conditions (and get rid of the posts_per_page). This will pull alot more results… Then, during the while loop, I check each post for an array_intersect for each meta keys. Since I only want 1 result, I break the loop if one is found.
While the solution works, I’d prefer to do this during the query process (to save resources)
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.