add actul dates events

This commit is contained in:
arlemp@selectel.ru
2021-11-05 14:19:49 +03:00
parent 7262b4a43a
commit c42c6c6a40
2 changed files with 10 additions and 2 deletions

View File

@@ -1,5 +1,4 @@
<?php echo calend_block(date('m'), date('Y'), true); <?php echo calend_block(date('m'), date('Y'), true);
setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
# три последних эвента # три последних эвента
@@ -9,7 +8,14 @@ $posts = get_posts( array(
'category' => 61, // 61 - мероприятия 'category' => 61, // 61 - мероприятия
'orderby' => 'meta_value', 'orderby' => 'meta_value',
'order' => 'ASC', '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_type' => 'post',
//'post_status' => 'publish', //'post_status' => 'publish',
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса

View File

@@ -1,5 +1,7 @@
<?php <?php
setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
define('IMGURL', 'http://img.vetandlife.ru/'); define('IMGURL', 'http://img.vetandlife.ru/');
define("COOK_GOLOS", "_ya_id_76543_w"); define("COOK_GOLOS", "_ya_id_76543_w");
define("COOK_VALUE", "7895"); define("COOK_VALUE", "7895");