add blocks cache
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# три последних эвента
|
||||
|
||||
$posts = get_posts( array(
|
||||
$zakon_posts = get_posts( array(
|
||||
'numberposts' => 2,
|
||||
'category' => 6,
|
||||
'post_type' => 'post',
|
||||
@@ -11,24 +11,22 @@ $posts = get_posts( array(
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
if( $zakon_posts ):?>
|
||||
|
||||
<div class="publs_right">
|
||||
|
||||
<div class="publs_right_title">Законодательство</div>
|
||||
|
||||
<?foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
<?foreach($zakon_posts as $zakon):
|
||||
//setup_postdata( $post );
|
||||
?>
|
||||
|
||||
<div class="publs_right_item">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
<a href="<?=get_permalink($zakon);?>"><?php echo $zakon->post_title;?></a>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
<?endif;?>
|
||||
Reference in New Issue
Block a user