new block promo agg

This commit is contained in:
2023-12-15 16:52:30 +03:00
parent 19a7e3f4a1
commit 44ef31d4eb
9 changed files with 127 additions and 22 deletions

View File

@@ -1,14 +1,20 @@
<?php
$more_posts = get_posts( array(
'numberposts' => 6,
$more_params = [
'numberposts' => 6,
'category' => 61, // пока тольео события
'meta_key' => 'startevent',
'meta_value' =>'',
'post_type' => 'post',
'post__not_in' => array($post_id),
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) );
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
];
if (isset($post_id)){
$more_params['post__not_in'] = array($post_id);
}
$more_posts = get_posts( $more_params );
# вывод поста