Support

Account

Home Forums Front-end Issues Wp_query with relationship to another custom post type Reply To: Wp_query with relationship to another custom post type

  • 'meta_query' => array(
      array(
        'key' => 'hospital',
        'value' => array( 3, 4 ), // array of hospitals IDs from 1st query
        'compare' => 'IN',
      ),

    Cool?

    Not cool 🙂

    This does not work in my particular case. I can query with a single ID and compare “LIKE” but not with an array of IDs and compare “IN”.