no author adv
This commit is contained in:
109
index.php
109
index.php
@@ -1,109 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* The main template file.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
get_header();
|
|
||||||
$nn = 0;?>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<h1 id="mainpage-title">Главное</h1>
|
|
||||||
|
|
||||||
<?include(get_template_directory().'/blocks/mainnews.php');?>
|
|
||||||
<?//include(get_template_directory().'/blocks/mainnews_happy.php');?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php $query = new WP_Query(
|
|
||||||
array(
|
|
||||||
'category__in' => array(2),
|
|
||||||
'post__not_in' => array($mainpost_id),
|
|
||||||
'posts_per_page' => 24,
|
|
||||||
'meta_query' => array(
|
|
||||||
array(
|
|
||||||
'key' => '_thumbnail_id',
|
|
||||||
//'compare' => 'EXISTS'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
); # фильтруем рубрики
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if($query->have_posts()) : ?>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="mini-card-block">
|
|
||||||
|
|
||||||
<?php while($query->have_posts()) : $query->the_post();?>
|
|
||||||
|
|
||||||
<?$nn++?>
|
|
||||||
|
|
||||||
<?//if ($nn == 1):
|
|
||||||
//card_post_id(28999, '');
|
|
||||||
// include get_template_directory().'/blocks/card_post_happy.php';
|
|
||||||
//elseif($nn == 3):
|
|
||||||
//card_post_id(29001, '');
|
|
||||||
//elseif($nn == 4):
|
|
||||||
//card_post_id(29005, '');
|
|
||||||
//endif?>
|
|
||||||
|
|
||||||
<?//if($nn == 4):
|
|
||||||
//card_post_id(31271, '');
|
|
||||||
//endif?>
|
|
||||||
|
|
||||||
<?if ($nn < 25):?>
|
|
||||||
|
|
||||||
<div class="mini-card">
|
|
||||||
<?if ( has_post_thumbnail() ) :?>
|
|
||||||
<div class="mini-card-img">
|
|
||||||
<a href="<?the_permalink();?>">
|
|
||||||
<?$imgurl = IMGSERVER.'news/512x340/'.str_replace('https://vetandlife.ru/wp-content/uploads/', '', get_the_post_thumbnail_url(null, 'full'))?>
|
|
||||||
<img class="mini-card-img" src="<?=$imgurl;?>" alt="<?the_title();?>">
|
|
||||||
<?if( has_tag( 'видео' ) ):?>
|
|
||||||
<span class="play-card"></span>
|
|
||||||
<?endif?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?endif?>
|
|
||||||
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
|
||||||
<div class="mini-card-body">
|
|
||||||
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?endif?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php endwhile;?>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php endif;?>
|
|
||||||
|
|
||||||
<?php wp_reset_postdata();?>
|
|
||||||
|
|
||||||
<div class="publ-to-main">
|
|
||||||
<button class="more_button" onclick="location.href='<?=get_category_link(2)?>/page/2'" type="button">
|
|
||||||
Показать ещe</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?get_template_part( '/blocks/opinion', null, ['subclass' => 'mob-lite']);?>
|
|
||||||
|
|
||||||
<?get_template_part( '/blocks/citats', null, ['subclass' => 'mob-lite']);?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- end content -->
|
|
||||||
|
|
||||||
<?php //include get_template_directory().'/blocks/popunder.php';?>
|
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
|
||||||
|
|||||||
@@ -29,9 +29,20 @@ function create_rss_yandex(){
|
|||||||
'meta_value' =>'',
|
'meta_value' =>'',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||||
|
'meta_query' => array(
|
||||||
|
'relation' => 'OR',
|
||||||
|
array(
|
||||||
|
'key' => '_erid_token',
|
||||||
|
'value' => '',
|
||||||
|
'compare' => '='
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'key' => '_erid_token',
|
||||||
|
'compare' => 'NOT EXISTS'
|
||||||
|
)
|
||||||
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Яндекс Новости
|
// Яндекс Новости
|
||||||
create_rss_file($posts, 'views/rss/yanews.php', '/vhosts/vetandlife.ru/rss/yanews.xml');
|
create_rss_file($posts, 'views/rss/yanews.php', '/vhosts/vetandlife.ru/rss/yanews.xml');
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<?$author = get_the_author();
|
<?$author = get_the_author();
|
||||||
|
|
||||||
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru'):?>
|
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru' AND $author !== 'Анна Купровская'):?>
|
||||||
<div class="post_author">
|
<div class="post_author">
|
||||||
Автор: <?php the_author(); ?>
|
Автор: <?php the_author(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ if ( $pets_cat ){
|
|||||||
<div id="fulltext">
|
<div id="fulltext">
|
||||||
<h1 class="post-h1"><?php wp_title('');?></h1>
|
<h1 class="post-h1"><?php wp_title('');?></h1>
|
||||||
<?$author = get_the_author();
|
<?$author = get_the_author();
|
||||||
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru'):
|
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru' AND $author !== 'Анна Купровская'):
|
||||||
$author_bio = get_the_author_meta('description', $author_id);?>
|
$author_bio = get_the_author_meta('description', $author_id);?>
|
||||||
<div class="post_author">
|
<div class="post_author">
|
||||||
Автор: <?=the_author_posts_link()?>
|
Автор: <?=the_author_posts_link()?>
|
||||||
|
|||||||
Reference in New Issue
Block a user