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>
|
||||
<div class="right_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></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;
|
||||
Reference in New Issue
Block a user