Before I submit a formal request, I was hoping someone had some insight on this issue.
I have a custom post type named “Section” that all post types can select using ACF Relationship in their post meta box.
I then want to be able to find all posts with a specific “section” selected in their Section field.
Im using this code to no avail:
$args=array(
'meta_query' => array(
array(
'key' => 'section',
'value' => $name,
'compare' => '=' ) ) );
var_dump ($args);
$articles = get_posts($args);
$name is assigned elsewhere and var_dump shows that the value assigned to $name is fine.
Nothing is returned, however.
Any ideas? Thanks in advance for any help.