correct block mobile gazeta
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$posts = get_posts( array(
|
$gposts = get_posts( array(
|
||||||
'numberposts' => 1,
|
'numberposts' => 1,
|
||||||
'category' => 3, // 19 - архив газеты
|
'category' => 3, // 19 - архив газеты
|
||||||
'orderby' => 'date',
|
'orderby' => 'date',
|
||||||
@@ -9,23 +9,22 @@ $posts = get_posts( array(
|
|||||||
'exclude' => array(),
|
'exclude' => array(),
|
||||||
'meta_key' => '',
|
'meta_key' => '',
|
||||||
'meta_value' =>'',
|
'meta_value' =>'',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post'
|
||||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
||||||
) );
|
) );
|
||||||
|
|
||||||
# вывод поста
|
# вывод поста
|
||||||
if( $posts ):
|
if( $gposts ):
|
||||||
|
|
||||||
|
foreach($gposts as $gpost):
|
||||||
|
|
||||||
foreach($posts as $post):
|
|
||||||
setup_postdata( $post );
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="mobile_archive">
|
<div class="mobile_archive">
|
||||||
<a href="<?php the_permalink(); ?>"><img width="91" class="mobile_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
|
<a href="<?php the_permalink($gpost->ID); ?>"><img width="91" class="mobile_archive_img" src="<?php echo get_the_post_thumbnail_url($gpost->ID, 'fil');?>" alt="<?the_title($gpost->ID);?>"></a>
|
||||||
<div class="mobile_archive_text">
|
<div class="mobile_archive_text">
|
||||||
<div><strong><a href="<?php the_permalink(); ?>"><?=vij_lang('gazeta', LANG_VERSION);?></a></strong></div>
|
<div><strong><a href="<?php the_permalink($gpost->ID); ?>"><?=vij_lang('gazeta', LANG_VERSION);?></a></strong></div>
|
||||||
<?if (LANG_VERSION == 'ru'):?>
|
<?if (LANG_VERSION == 'ru'):?>
|
||||||
<div class="mobile_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
|
<div class="mobile_archive_link"><a href="<?php the_permalink($gpost->ID); ?>"><?=the_title($gpost->ID);?></a></div>
|
||||||
<?endif?>
|
<?endif?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,7 +32,7 @@ if( $posts ):
|
|||||||
|
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
|
|
||||||
wp_reset_postdata();
|
|
||||||
|
|
||||||
endif;?>
|
endif;?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user