add eng blocks
This commit is contained in:
@@ -23,7 +23,9 @@ if( $posts ):
|
||||
<div class="right_archive">
|
||||
<a href="<?php the_permalink(); ?>"><img width="147" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
|
||||
<div class="right_archive_text"><a href="<?php the_permalink(); ?>"><?=vij_lang('gazeta', LANG_VERSION);?></a></div>
|
||||
<?if (LANG_VERSION == 'ru'):?>
|
||||
<div class="right_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
|
||||
<?endif?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
45
blocks/enmoread.php
Normal file
45
blocks/enmoread.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 4,
|
||||
'category' => 4782, // англ статьи
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
'exclude' => array(),
|
||||
'meta_key' => '',
|
||||
'meta_value' =>'',
|
||||
'post_type' => 'post',
|
||||
'post__not_in' => array($post_id),
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_thumbnail_id',
|
||||
//'compare' => 'EXISTS'
|
||||
)
|
||||
),
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
|
||||
<div class="moread_rubric">Read also:</div>
|
||||
|
||||
<div class="moread">
|
||||
|
||||
<?php foreach($posts as $post):
|
||||
setup_postdata( $post );?>
|
||||
|
||||
<div class="moread_card">
|
||||
<img src="<?php echo get_the_post_thumbnail_url($post);?>" alt="<?the_title();?>">
|
||||
<div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
|
||||
<div class="moread_date"><?echo mysql2date( 'j M Y H:i', $post->post_date, false );?></div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php wp_reset_postdata();
|
||||
|
||||
endif?>
|
||||
@@ -7,6 +7,7 @@
|
||||
$mosts = get_posts( array(
|
||||
'numberposts' => 3,
|
||||
'post__in' => get_option( 'sticky_posts' ),
|
||||
'cat' => '-4782',
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
34
blocks/regulation.php
Normal file
34
blocks/regulation.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
# три последних эвента
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 2,
|
||||
'category' => 4784,
|
||||
'post_type' => 'post',
|
||||
//'post_status' => 'publish, future',
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
# вывод поста
|
||||
if( $posts ):?>
|
||||
|
||||
<div class="publs_right">
|
||||
|
||||
<div class="publs_right_title">Guidance and regulation</div>
|
||||
|
||||
<?foreach($posts as $post):
|
||||
setup_postdata( $post );
|
||||
?>
|
||||
|
||||
<div class="publs_right_item">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
|
||||
</div>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?wp_reset_postdata();
|
||||
|
||||
endif;
|
||||
19
footer.php
19
footer.php
@@ -7,14 +7,19 @@
|
||||
|
||||
<div id="left">
|
||||
|
||||
|
||||
|
||||
<?php // include VIJ_CACHE.'leftmenu.html';?>
|
||||
<?php get_template_part( '/blocks/leftmenu');?>
|
||||
|
||||
<?if (LANG_VERSION == 'ru'):?>
|
||||
<?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?>
|
||||
<?php get_template_part( '/blocks/citats')?>
|
||||
<?php //include VIJ_CACHE.'opinion.html';?>
|
||||
<?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
|
||||
<?php get_template_part( '/blocks/events');?>
|
||||
<?php //include VIJ_CACHE.'events.html';?>
|
||||
<?endif?>
|
||||
|
||||
<div class="right-info">
|
||||
<a href="https://vetandlife.ru/vetspetsialist-sportsmenka-i-prosto-kras/">
|
||||
@@ -82,12 +87,24 @@
|
||||
|
||||
|
||||
|
||||
<?if (LANG_VERSION == 'en'){
|
||||
get_template_part( '/blocks/regulation');
|
||||
}
|
||||
else {
|
||||
get_template_part( '/blocks/zakons');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php get_template_part( '/blocks/zakons');?>
|
||||
<?php //include VIJ_CACHE.'zakons.html';?>
|
||||
|
||||
<?if (LANG_VERSION == 'en'):?>
|
||||
<?get_template_part( '/blocks/enmosts', null, ['subclass' => '']);?>
|
||||
<?get_template_part( '/blocks/enmosts', null, ['subclass' => 'mob-lite']);?>
|
||||
<?else:?>
|
||||
<?get_template_part( '/blocks/mosts', null, ['subclass' => '']);?>
|
||||
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
|
||||
<?endif?>
|
||||
|
||||
<?//php include VIJ_CACHE.'mosts.html';?>
|
||||
</div>
|
||||
</div><!-- end main -->
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //include get_template_directory().'/blocks/moread.php';?>
|
||||
<?php include get_template_directory().'/blocks/enmoread.php';?>
|
||||
|
||||
<div class="publ-to-main">
|
||||
<button class="more_button" onclick="location.href='<?=get_site_url()?>/en'" type="button">
|
||||
|
||||
Reference in New Issue
Block a user