Files
vij/blocks/mobile-gazeta.php

54 lines
1.9 KiB
PHP
Raw Normal View History

2021-11-22 22:22:04 +03:00
<?php
$posts = get_posts( array(
'numberposts' => 1,
'category' => 3, // 19 - архив газеты
'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="mobile_archive">
<a href="<?php the_permalink(); ?>"><img width="91" class="mobile_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
<div class="mobile_archive_text">
<div><strong><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></strong></div>
<div class="mobile_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
</div>
</div>
<?php endforeach;
wp_reset_postdata();
endif;?>
<div class="mob-subscript">
<div class="mob-block-button">
<a class="mob-sub-button" href="https://vetandlife.ru/subscripts">Газета ВиЖ. Оформить подписку</a>
</div>
<div class="right_title">Подпишитесь на&nbsp;нашу рассылку и&nbsp;будьте в&nbsp;курсе всех новостей</div>
<div id="subscript-mail">
<form class="form-right" action="https://login.sendpulse.com/forms/simple/u/eyJ1c2VyX2lkIjo3NjMwNTYzLCJhZGRyZXNzX2Jvb2tfaWQiOjIyNjM5NCwibGFuZyI6InJ1In0=" method="post">
<input сlass="frm_mail" type="email" required="" name="email" placeholder="Ваша почта">
<input type="hidden" name="sender" value="info@vetandlife.ru">
<button class="frm_submit">Подписаться</button>
</form>
</div>
</div>