2021-09-24 23:18:38 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$posts = get_posts( array(
|
|
|
|
|
'numberposts' => 1,
|
2021-10-09 13:05:18 +03:00
|
|
|
'category' => 3, // 19 - архив газеты
|
2021-09-24 23:18:38 +03:00
|
|
|
'orderby' => 'date',
|
|
|
|
|
'order' => 'DESC',
|
|
|
|
|
'include' => array(),
|
|
|
|
|
'exclude' => array(),
|
|
|
|
|
'meta_key' => '',
|
|
|
|
|
'meta_value' =>'',
|
|
|
|
|
'post_type' => 'post',
|
|
|
|
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
|
|
|
) );
|
|
|
|
|
|
|
|
|
|
# вывод поста
|
|
|
|
|
if( $posts ):
|
|
|
|
|
|
|
|
|
|
foreach($posts as $post):
|
|
|
|
|
setup_postdata( $post );
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<div class="right_archive">
|
2021-11-15 14:22:23 +03:00
|
|
|
<a href="<?php the_permalink(); ?>"><img width="147" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
|
2021-10-09 22:59:32 +03:00
|
|
|
<div class="right_archive_text"><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></div>
|
2021-10-31 13:01:31 +03:00
|
|
|
<div class="right_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
|
2021-09-28 22:25:21 +03:00
|
|
|
</div>
|
|
|
|
|
|
2021-09-24 23:18:38 +03:00
|
|
|
|
|
|
|
|
<?php endforeach;
|
|
|
|
|
|
|
|
|
|
wp_reset_postdata();
|
|
|
|
|
|
|
|
|
|
endif;
|