Home › Forums › General Issues › WP_Query … condition statements … now getting trim errors… › Reply To: WP_Query … condition statements … now getting trim errors…
The two trim errors are coming up when the two keys are involved (banner_cats and banner_towns). So, if I remove one of those arrays from the query, only one trim error occurs. Both of those keys are multi select fields in acf.
When I print the $pagecategories array (to check it), I get…
Array
(
[0] => 1
)
When I print $currenttowns array, I get…
Array
(
[0] => 1
[1] => 3215
)
So, I have one array (i.e. $currenttowns) comparing to the select field array (i.e. banner_towns) … can I not do that? I need to see if any of the fields in the arrays match, if so, then the query should call that post.
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.