add fa
This commit is contained in:
33
blocks/citata.php
Normal file
33
blocks/citata.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 7, // 7 - мнения
|
||||
'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="left_citata">
|
||||
<div class="left_citata_title">цитата</div>
|
||||
<img class="left_preview" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>">
|
||||
<div class="left_citata_text"><a href="<?php the_permalink(); ?>">«<?php the_title();?>»</a></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
@@ -16,19 +16,23 @@ $posts = get_posts( array(
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):
|
||||
if( $posts ):?>
|
||||
|
||||
foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
<div id="events_left">
|
||||
|
||||
<?foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
|
||||
<div class="event">
|
||||
<div class="news_date"><?the_time('j F Y');?></div>
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
</div>
|
||||
<div class="event">
|
||||
<div class="news_date"><?the_time('j F Y');?></div>
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
</div>
|
||||
|
||||
<?php endforeach;
|
||||
<?php endforeach;?>
|
||||
|
||||
wp_reset_postdata();
|
||||
</div>
|
||||
|
||||
<?wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 4,
|
||||
'category' => 0, // пока без категории
|
||||
'category' => 22, // пока тольео события
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
@@ -16,16 +16,17 @@ $posts = get_posts( array(
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
|
||||
<div class="moread_rubric">Читайте также:</div>
|
||||
|
||||
<div class="moread">
|
||||
<h4>Самое читаемое:</h3>
|
||||
|
||||
<?php foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
setup_postdata( $post );?>
|
||||
|
||||
<div class="moread_card">
|
||||
<img src="<?php echo get_the_post_thumbnail_url($post, 'moread');?>" alt="<?the_title();?>">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
<div><?the_time('j F Y, G:i');?></div>
|
||||
<div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||
<div class="moread_date"><?the_time('j F Y, G:i');?></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 3,
|
||||
'category' => 0, // пока без категории
|
||||
'category' => 22, // пока без категории
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
@@ -17,14 +17,12 @@ $posts = get_posts( array(
|
||||
if( $posts ):?>
|
||||
|
||||
<div id="mosts">
|
||||
<h3 class="most_title">Самое читаемое:</h3>
|
||||
<h3 class="most_title">Самое читаемое</h3>
|
||||
<?php foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
|
||||
<div class="most">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
</div>
|
||||
<div class="most"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
|
||||
@@ -20,9 +20,11 @@ if( $posts ):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
|
||||
|
||||
<img class="left_preview" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
<div class="left_opinion">
|
||||
<div class="left_opinion_title">мнение</div>
|
||||
<img class="left_preview" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>">
|
||||
<div class="left_opinion_text"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
|
||||
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