From c42c6c6a409eae897df8f624460697f8a6638c73 Mon Sep 17 00:00:00 2001 From: "arlemp@selectel.ru" Date: Fri, 5 Nov 2021 14:19:49 +0300 Subject: [PATCH] add actul dates events --- blocks/events.php | 10 ++++++++-- functions.php | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/blocks/events.php b/blocks/events.php index 0d5c2e7..f67923d 100644 --- a/blocks/events.php +++ b/blocks/events.php @@ -1,5 +1,4 @@ 61, // 61 - мероприятия 'orderby' => 'meta_value', 'order' => 'ASC', - 'meta_query' => array(array('key' => 'startevent')), + 'meta_query' => array( + array( + 'key' => 'startevent', + 'value' => date("Y-m-dTH:i:s"), + 'compare' => '>=', + 'type' => 'DATE' + ), + ), 'post_type' => 'post', //'post_status' => 'publish', 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса diff --git a/functions.php b/functions.php index 7f81e16..671a2c5 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,7 @@