add mobile media css
This commit is contained in:
32
blocks/archive.php
Normal file
32
blocks/archive.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 19, // 19 - архив газеты
|
||||
'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="right_archive">
|
||||
<img width="280" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'left-thumb');?>" alt="<?the_title();?>">
|
||||
<div class="right_archive_text"><a href="<?php the_permalink(); ?>">Читать газету:<br><?php the_title();?></a></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
@@ -10,6 +10,12 @@ $posts = get_posts( array(
|
||||
'meta_key' => '',
|
||||
'meta_value' =>'',
|
||||
'post_type' => 'post',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_thumbnail_id',
|
||||
//'compare' => 'EXISTS'
|
||||
)
|
||||
),
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php $posts = get_posts( array(
|
||||
'numberposts' => 4,
|
||||
'category' => 22, // пока тольео события
|
||||
'category' => $category_id, // текущая рубрика
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
Reference in New Issue
Block a user