correct date in events
This commit is contained in:
@@ -11,10 +11,8 @@ $posts = get_posts( array(
|
|||||||
'post__not_in' => array($post_id),
|
'post__not_in' => array($post_id),
|
||||||
'meta_query' => array(
|
'meta_query' => array(
|
||||||
array(
|
array(
|
||||||
'key' => 'startevent',
|
'key' => '_thumbnail_id',
|
||||||
'orderby' => 'meta_value',
|
//'compare' => 'EXISTS'
|
||||||
'order' => 'DESC'
|
|
||||||
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||||
|
|||||||
@@ -7,16 +7,11 @@ $more_posts = get_posts( array(
|
|||||||
'meta_value' =>'',
|
'meta_value' =>'',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post__not_in' => array($post_id),
|
'post__not_in' => array($post_id),
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => '_thumbnail_id',
|
|
||||||
//'compare' => 'EXISTS'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||||
) );
|
) );
|
||||||
|
|
||||||
# вывод поста
|
# вывод поста
|
||||||
|
|
||||||
if( $more_posts ):
|
if( $more_posts ):
|
||||||
$nr = 0;?>
|
$nr = 0;?>
|
||||||
|
|
||||||
@@ -32,7 +27,8 @@ if( $more_posts ):
|
|||||||
<?$imgurl = IMGSERVER.'news/512x340/'.str_replace('https://vetandlife.ru/wp-content/uploads/', '', get_the_post_thumbnail_url($post, 'full'))?>
|
<?$imgurl = IMGSERVER.'news/512x340/'.str_replace('https://vetandlife.ru/wp-content/uploads/', '', get_the_post_thumbnail_url($post, 'full'))?>
|
||||||
<img src="<?php echo $imgurl;?>" alt="<?the_title();?>">
|
<img src="<?php echo $imgurl;?>" alt="<?the_title();?>">
|
||||||
<div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
<div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||||
<div class="moread_date"><?the_time('j F Y, G:i');?></div>
|
<div class="moread_date"><?=date('j F Y', strtotime( get_post_meta($post->ID, 'startevent', true) ) );
|
||||||
|
?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
|
|||||||
Reference in New Issue
Block a user