I am attempting to use get_posts() to retrieve posts that have certain topics attached to them, in my custom post type named 'leaders'
Here is my query.
$args = array(
'post-type' => 'leaders',
'meta_query' => array(
array(
'key' => 'topics',
'value' => '1773',
'compare' => 'LIKE'
)
)
);
$test = get_posts( $args );
If I var_dump the posts meta data i get this
topics a:4:{i:0;s:4:"1773";i:1;s:4:"1783";i:2;s:4:"1763";i:3;s:4:"1753";}
However my get_posts just returns null, can anyone see why?