Home › Forums › General Issues › Relationship Object Not Showing › Reply To: Relationship Object Not Showing
Your meta_query is a bit off I think, the second meta_query is overriding the second.
$posts = get_posts(
array(
'post_type' => 'event',
'posts_per_page' => -1,
'meta_key' => 'event_date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'event_date',
'compare' => '>',
'value' => $today,
'type' => 'DATE',
),
array(
'key' => 'instructors',
'value' => $instructor,
'compare' =>'IN',
),
)
),
);
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.