Support

Account

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',
                ),
            )
        ),
    );