Home › Forums › General Issues › How to search for meta array? › Reply To: How to search for meta array?
You are searching for a number in the meta query. That means that the number must appear in either the title or the content
$title = ‘this is a title’
$content = ‘this is the content’
$meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’
then
($title LIKE ‘%1406%’ OR $content LIKE ‘%1406%’) AND $meta LIKE ‘%”1406″%’
Is false
The only way the above can be true is if something like either
$title = ‘this is 1406 a title’
$content = ‘this is the content’
$meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’
OR
$title = ‘this is a title’
$content = ‘this is the 1406 content’
$meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’
OR
$title = ‘this is a 1406 title’
$content = ‘this is the 1406 content’
$meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’
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.