From 222153074128c24d78b1d1b27229cad9aca217a6 Mon Sep 17 00:00:00 2001 From: "arlemp@selectel.ru" Date: Mon, 27 Mar 2023 23:26:09 +0300 Subject: [PATCH] add mored evevnts --- blocks/moread.php | 8 ++++---- blocks/moread_events.php | 44 ++++++++++++++++++++++++++++++++++++++++ single-61.php | 6 +++--- 3 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 blocks/moread_events.php diff --git a/blocks/moread.php b/blocks/moread.php index 26e0aa1..f2ff857 100644 --- a/blocks/moread.php +++ b/blocks/moread.php @@ -7,14 +7,14 @@ $posts = get_posts( array( 'order' => 'DESC', 'include' => array(), 'exclude' => array(), - 'meta_key' => '', - 'meta_value' =>'', 'post_type' => 'post', 'post__not_in' => array($post_id), 'meta_query' => array( array( - 'key' => '_thumbnail_id', - //'compare' => 'EXISTS' + 'key' => 'startevent', + 'orderby' => 'meta_value', + 'order' => 'DESC' + ) ), 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса diff --git a/blocks/moread_events.php b/blocks/moread_events.php new file mode 100644 index 0000000..024b960 --- /dev/null +++ b/blocks/moread_events.php @@ -0,0 +1,44 @@ + 6, + 'category' => 61, // пока тольео события + 'meta_key' => 'startevent', + 'meta_value' =>'', + 'post_type' => 'post', + 'post__not_in' => array($post_id), + 'meta_query' => array( + array( + 'key' => '_thumbnail_id', + //'compare' => 'EXISTS' + ) + ), + 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса +) ); + +# вывод поста +if( $more_posts ): + $nr = 0;?> + +
Другие мероприятия:
+ +
+ + + +
+ + <?the_title();?> +
+
+
+ + + +
+ + diff --git a/single-61.php b/single-61.php index 6d813c3..790e80d 100644 --- a/single-61.php +++ b/single-61.php @@ -50,7 +50,9 @@ - + + +
@@ -65,8 +67,6 @@
- -
<   На главную