$endDate) ? $endDate : $jEDate); return (((strtotime($jSDate) < strtotime($endDate)) && (strtotime($jSDate) > strtotime($startDate))) && (strtotime($jEDate) > strtotime($startDate))); } $args= array( 'post_type' => array( 'job' ), 'posts_per_page' => -1 ); $loop = new WP_Query( $args ); ?>