-
-
Save csaborio001/c66931cc57adce446bfc8dcfa21aad4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//START TRAINING DATES FILTER | |
$start_date = new DateTime($_POST['date_start']); | |
$start_date = $start_date->format('Ymd'); // Change the date format to what ACF expects | |
$end_date = new DateTime($_POST['date_end']); | |
$end_date = $end_date->format('Ymd'); // Change the date format to what ACF expects | |
if(isset($_POST['date_start']) && $_POST['date_start'] && | |
isset($_POST['date_end']) && $_POST['date_end']) { | |
$args['meta_query'][] = array( | |
'key' => 'volunteer_probity_check_and_training_stage_%volunteer_training_date', | |
'value' => array($start_date, $end_date), | |
'type' => 'date', | |
'compare' => 'BETWEEN' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment