Files
vij/blocks/regulation.php
arlemp@selectel.ru 1500b493c9 add eng blocks
2021-12-12 19:26:50 +03:00

34 lines
731 B
PHP

<?php
# три последних эвента
$posts = get_posts( array(
'numberposts' => 2,
'category' => 4784,
'post_type' => 'post',
//'post_status' => 'publish, future',
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) );
# вывод поста
if( $posts ):?>
<div class="publs_right">
<div class="publs_right_title">Guidance and regulation</div>
<?foreach($posts as $post):
setup_postdata( $post );
?>
<div class="publs_right_item">
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
</div>
<?php endforeach;?>
</div>
<?wp_reset_postdata();
endif;