add fa
This commit is contained in:
36
blocks/yets.php
Normal file
36
blocks/yets.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php $posts = get_posts( array(
|
||||
'numberposts' => 4,
|
||||
'category' => 22, // пока тольео события
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
'exclude' => array(),
|
||||
'meta_key' => '',
|
||||
'meta_value' =>'',
|
||||
'post_type' => 'post',
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
|
||||
<div class="yets_rubric">Еще по теме</div>
|
||||
|
||||
<div class="yets">
|
||||
|
||||
<?php foreach($posts as $post):
|
||||
setup_postdata( $post );?>
|
||||
|
||||
<div class="yet_card">
|
||||
<div class="yet_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php wp_reset_postdata();
|
||||
|
||||
endif?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user