add eng blocks
This commit is contained in:
34
blocks/regulation.php
Normal file
34
blocks/regulation.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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;
|
||||
Reference in New Issue
Block a user