publish employees
// WP_Query arguments $args = array( 'post_type' => array( 'employees' ), 'post_status' => array( 'publish' ), 'posts_per_page' => '500', 'order' => 'ASC', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'department', 'terms' => 'fannie-maefha-finance', 'field' => 'slug', 'operator' => 'IN', ), ), 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'deptId', 'value' => '49', 'compare' => '=', ), array( 'key' => 'isEmpProfilePublic', 'value' => '1', 'compare' => '=', ), array( 'key' => 'office_id', 'value' => '$location_id', 'compare' => '=', ), ), ); // The Query $query = new WP_Query( $args );