correct block mobile gazeta
This commit is contained in:
@@ -36,7 +36,7 @@ else{
|
||||
</div>
|
||||
|
||||
<div class="mob_menu_info">
|
||||
<?php include get_template_directory().'/blocks/mobile-gazeta.php';?>
|
||||
<?php include get_template_directory().'/blocks/mobile-gazeta.php';?>
|
||||
<?php include get_template_directory().'/blocks/mobile-subscript.php';?>
|
||||
<?php include get_template_directory().'/blocks/social-buttons.php';?>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$posts = get_posts( array(
|
||||
$gposts = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 3, // 19 - архив газеты
|
||||
'orderby' => 'date',
|
||||
@@ -9,23 +9,22 @@ $posts = get_posts( array(
|
||||
'exclude' => array(),
|
||||
'meta_key' => '',
|
||||
'meta_value' =>'',
|
||||
'post_type' => 'post',
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
'post_type' => 'post'
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):
|
||||
if( $gposts ):
|
||||
|
||||
foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
foreach($gposts as $gpost):
|
||||
|
||||
?>
|
||||
|
||||
<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><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'):?>
|
||||
<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?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,7 +32,7 @@ if( $posts ):
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
|
||||
endif;?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user