jmccole83
1/14/2020 - 3:30 PM

Example Query

Example uses variables set from custom fields also.

$args = array(
  'post_type'         => 'case-studies',
  'posts_per_page'    => 9,
  'post_status'       => 'publish',
  'order'             => 'DESC',
  'tax_query'         => array(
    array(
      'taxonomy'  => 'employer',
      'field'     => 'name',
      'terms'     => $employer
    )
  ),
);

$the_query = new \WP_Query( $args );