This commit is contained in:
2021-09-20 01:07:53 +03:00
parent d9c6a87cfe
commit 80da45b1d7
12 changed files with 549 additions and 104 deletions

View File

@@ -2,7 +2,7 @@
$posts = get_posts( array(
'numberposts' => 4,
'category' => 0, // пока без категории
'category' => 22, // пока тольео события
'orderby' => 'date',
'order' => 'DESC',
'include' => array(),
@@ -16,16 +16,17 @@ $posts = get_posts( array(
# вывод поста
if( $posts ):?>
<div class="moread_rubric">Читайте также:</div>
<div class="moread">
<h4>Самое читаемое:</h3>
<?php foreach($posts as $post):
setup_postdata( $post );
?>
setup_postdata( $post );?>
<div class="moread_card">
<img src="<?php echo get_the_post_thumbnail_url($post, 'moread');?>" alt="<?the_title();?>">
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
<div><?the_time('j F Y, G:i');?></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>
<?php endforeach;?>