add correct meta calendar
This commit is contained in:
@@ -5,17 +5,11 @@
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 3,
|
||||
'category' => 61, // 61 - мероприятия
|
||||
'orderby' => 'date',
|
||||
'orderby' => 'meta_value',
|
||||
'order' => 'ASC',
|
||||
|
||||
'date_query' => array(
|
||||
array(
|
||||
'after' => '3 days ago',
|
||||
),
|
||||
),
|
||||
|
||||
'meta_query' => array(array('key' => 'startevent')),
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish, future',
|
||||
//'post_status' => 'publish, future',
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
@@ -29,7 +23,8 @@ if( $posts ):?>
|
||||
?>
|
||||
|
||||
<div class="event">
|
||||
<div class="news_date"><?the_time('j F Y');?></div>
|
||||
<?$eventdate = get_post_meta( $post->ID, 'startevent', true );?>
|
||||
<div class="news_date"><?=date_i18n('j F Y', strtotime($eventdate))?></div>
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
</div>
|
||||
|
||||
@@ -39,4 +34,4 @@ if( $posts ):?>
|
||||
|
||||
<?wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user