Home › Forums › General Issues › Post Object meta query › Reply To: Post Object meta query
Could you please share the JSON or XML export field of your field group?
Also, could you please check if the Select multiple values? is set to “Yes” or “No”?
If it’s set to “No”, then you need to query it like this:
$query = new WP_Query(array(
"post_type" => "mycustomposttype",
"meta_query" => array(
'key' => 'my_custom_field',
'value' => get_the_ID()
)
));
Thanks 🙂
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.