new logic yets and moread
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 4,
|
||||
'numberposts' => 6,
|
||||
'category' => 2, // пока тольео события
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
@@ -21,16 +21,18 @@ $posts = get_posts( array(
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
if( $posts ):
|
||||
$nr = 0;?>
|
||||
|
||||
<div class="moread_rubric">Читайте также:</div>
|
||||
|
||||
<div class="moread">
|
||||
|
||||
<?php foreach($posts as $post):
|
||||
$nr++;
|
||||
setup_postdata( $post );?>
|
||||
|
||||
<div class="moread_card">
|
||||
<div class="moread_card" id="moread_<?=$nr?>">
|
||||
<img src="<?php echo get_the_post_thumbnail_url($post);?>" alt="<?the_title();?>">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user