This commit is contained in:
Ben Goldsworthy 2021-01-09 13:05:24 +00:00
parent f36252f563
commit 213ea4a7af
2 changed files with 110 additions and 110 deletions

View File

@ -13,13 +13,13 @@
get_header(); ?>
<?php
function withinDates( $jSDate, $jEDate ) {
function withinDates( $jSDate, $jEDate ) {
$endYear = date( 'Y' );
$endDate = $endYear . '-12-31';
$startDate = ( $endYear - 2 ) . '-01-01';
$jEDate = ( ! $jEDate ) ? date( 'Y-m-d' ) : ( ( $jEDate > $endDate ) ? $endDate : $jEDate );
return ( ( ( strtotime( $jSDate ) < strtotime( $endDate ) ) && ( strtotime( $jSDate ) > strtotime( $startDate ) ) ) && ( strtotime( $jEDate ) > strtotime( $startDate ) ) );
}
}
$args = array(
'post_type' => array(
'job',
@ -27,7 +27,7 @@ get_header(); ?>
'posts_per_page' => -1,
);
$loop = new WP_Query( $args );
?>
?>
<div id="experience-wrapper" class="content-area col-10 col-m-12">
<header class="post-header-title">