new block promo agg

This commit is contained in:
2023-12-15 16:52:30 +03:00
parent 19a7e3f4a1
commit 44ef31d4eb
9 changed files with 127 additions and 22 deletions

View File

@@ -1,14 +1,20 @@
<?php <?php
$more_posts = get_posts( array(
$more_params = [
'numberposts' => 6, 'numberposts' => 6,
'category' => 61, // пока тольео события 'category' => 61, // пока тольео события
'meta_key' => 'startevent', 'meta_key' => 'startevent',
'meta_value' =>'', 'meta_value' =>'',
'post_type' => 'post', 'post_type' => 'post',
'post__not_in' => array($post_id),
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) ); ];
if (isset($post_id)){
$more_params['post__not_in'] = array($post_id);
}
$more_posts = get_posts( $more_params );
# вывод поста # вывод поста

View File

@@ -0,0 +1,5 @@
<div class="promo-agregators">
<p>Свежие отраслевые новости на нашем канале в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p>
<p>Добавьте «Ветеринарию и жизнь» в избранное в <a href="https://yandex.ru/news/?favid=254162793" target="_blank"><span class="promo_ya"></span><span style="font-weight: bold; color:black;">ДЗЕН.НОВОСТИ</span></a></p>
<p>Подписывайтесь на канал «ВиЖ» в <b><a href="https://zen.yandex.ru/id/5ee3cb4d4954b90c587dec79" target="_blank"><span style="font-weight: bold; color:black;">ДЗЕН</a></b></p>
</div>

View File

@@ -1,4 +1,7 @@
<?php $posts = get_posts( array( <?php
$yets_params = [
'numberposts' => 4, 'numberposts' => 4,
'category' => $category_id, // текущая рубрика 'category' => $category_id, // текущая рубрика
'orderby' => 'date', 'orderby' => 'date',
@@ -8,9 +11,15 @@
'meta_key' => '', 'meta_key' => '',
'meta_value' =>'', 'meta_value' =>'',
'post_type' => 'post', 'post_type' => 'post',
'post__not_in' => array($post_id),
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) );
];
if (isset($post_id)){
$yets_params['post__not_in'] = array($post_id);
}
$posts = get_posts($yets_params);
# вывод поста # вывод поста
if( $posts ): if( $posts ):

View File

@@ -37,6 +37,19 @@
</a> </a>
</div> </div>
<div class="right-info">
<!-- Yandex.RTB R-A-4145099-1 -->
<div id="yandex_rtb_R-A-4145099-1"></div>
<script>
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
"blockId": "R-A-4145099-1",
"renderTo": "yandex_rtb_R-A-4145099-1"
})
})
</script>
</div>
<?endif?> <?endif?>
@@ -80,6 +93,11 @@
<?if (LANG_VERSION == 'ru'):?> <?if (LANG_VERSION == 'ru'):?>
<div class="right-info">
<? banners_conf_display( 'vgnki_240x400' ) ?>
</div>
<div class="right-info"> <div class="right-info">
<? banners_conf_display( 'right_240x400_1' ) ?> <? banners_conf_display( 'right_240x400_1' ) ?>
</div> </div>
@@ -89,9 +107,11 @@
</div> </div>
<div class="right-info"> <div class="right-info">
<? banners_conf_display( 'vgnki_240x400' ) ?> <? banners_conf_display( 'right_240x400_3' ) ?>
</div> </div>
<?endif?> <?endif?>
@@ -146,6 +166,10 @@
<?if (LANG_VERSION == 'ru'):?> <?if (LANG_VERSION == 'ru'):?>
<div class="mobile-info">
<? banners_conf_display( 'vgnki_240x200' ) ?>
</div>
<div class="mobile-info"> <div class="mobile-info">
<? banners_conf_display( 'right_240x200_1' ) ?> <? banners_conf_display( 'right_240x200_1' ) ?>
</div> </div>
@@ -155,15 +179,27 @@
</div> </div>
<div class="mobile-info"> <div class="mobile-info">
<? banners_conf_display( 'vgnki_240x200' ) ?> <? banners_conf_display( 'right_240x200_3' ) ?>
</div> </div>
<?endif?> <?endif?>
<?php include get_template_directory().'/blocks/mobile-subscript.php';?> <?php include get_template_directory().'/blocks/mobile-subscript.php';?>
<!-- Yandex.RTB R-A-4145099-4 -->
<script>
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
"blockId": "R-A-4145099-4",
"type": "floorAd",
"platform": "touch"
})
})
</script>
<footer id="footer"> <footer id="footer">
@@ -199,7 +235,7 @@
<div id="footer_qr"> <div id="footer_qr">
<div class="footer_qr"> <div class="footer_qr">
<img id="img_qr" src = "<?=get_stylesheet_directory_uri()?>/pub/icons/zen-code.svg" width="100" height="100" /> <img id="img_qr" src = "<?=get_stylesheet_directory_uri()?>/pub/icons/zen-code.svg" width="100" height="100" />
<p class="vazh">"ВиЖ"<br>Яндекс.Дзен</p> <p class="vazh">"ВиЖ"<br>Дзен</p>
</div> </div>
<div class="footer_qr qr_vk"> <div class="footer_qr qr_vk">
<img id="img_qr" src = "<?=get_stylesheet_directory_uri()?>/pub/icons/qr-vk.svg" width="100" height="100" /> <img id="img_qr" src = "<?=get_stylesheet_directory_uri()?>/pub/icons/qr-vk.svg" width="100" height="100" />

View File

@@ -69,6 +69,18 @@ add_action( 'phpmailer_init', 'vij_send_smtp_email' );
db_config(DB_NAME, 'mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD); db_config(DB_NAME, 'mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);
#function wpb_change_search_url() {
# if ( is_search() && ! empty( $_GET['s'] ) ) {
# wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) );
# exit();
# }
#}
#add_action( 'template_redirect', 'wpb_change_search_url' );
# регистрируем меню # регистрируем меню
register_nav_menus(array( register_nav_menus(array(
'top' => 'Верхнее меню', 'top' => 'Верхнее меню',

View File

@@ -11,7 +11,7 @@
<?if (defined('TESTMODE') and TESTMODE == 1):?> <?if (defined('TESTMODE') and TESTMODE == 1):?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3"> <link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3">
<?else:?> <?else:?>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=364"> <link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=368">
<?endif?> <?endif?>
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet"> <link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">--> <!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">-->
@@ -46,7 +46,9 @@
<?endif?> <?endif?>
<?php wp_head();?> <?php wp_head();?>
<!-- Yandex.RTB -->
<script>window.yaContextCb=window.yaContextCb||[]</script>
<script src="https://yandex.ru/ads/system/context.js" async></script>
</head> </head>
<body> <body>

View File

@@ -51,6 +51,10 @@
<?the_content();?> <?the_content();?>
</div> </div>
<div class="promo-agregators">
<p>Читайте нас в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p>
</div>
<div class="post_panel_info"> <div class="post_panel_info">
<div class="post_panel_info_sub"> <div class="post_panel_info_sub">
<span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>, <nobr><?php the_time('j F Y, G:i');?></nobr> <span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>, <nobr><?php the_time('j F Y, G:i');?></nobr>
@@ -64,14 +68,33 @@
<strong>Какие новости интересны читателям «Ветеринарии и жизни»? <a href="https://vetandlife.ru/polls/opros-kakie-novosti-interesny-chitatelyam-veterinarii-i-zhizni/">Пройти опрос</a></strong> <strong>Какие новости интересны читателям «Ветеринарии и жизни»? <a href="https://vetandlife.ru/polls/opros-kakie-novosti-interesny-chitatelyam-veterinarii-i-zhizni/">Пройти опрос</a></strong>
</div> </div>
<div class="promo-agregators">
<p>Свежие отраслевые новости на нашем канале в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p>
<p>Добавьте «Ветеринарию и жизнь» в избранное в <a href="https://yandex.ru/news/?favid=254162793" target="_blank"><span class="promo_ya">Я</span><span style="font-weight: bold; color:black;">НДЕКС.НОВОСТИ</span></a></p>
<p>Подписывайтесь на канал «ВиЖ» в <b><a href="https://zen.yandex.ru/id/5ee3cb4d4954b90c587dec79" target="_blank"><span class="promo_ya">Я</span>НДЕКС.ДЗЕН</a></b></p>
</div>
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> --> <!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
<?//endwhile;?> <?//endwhile;?>
<div style="margin-top: 12px;"class="aQKhHt2390"></div>
<script>
window.k_init = window.k_init || [];
k_init.push({
id: 'aQKhHt2390',
type: 'bn',
domain: 'cchdbond.com',
refresh: false,
next: 0
});
var s = document.createElement('script');
s.setAttribute('async', true);
s.setAttribute('charset', 'utf-8');
s.setAttribute('data-cfasync', false);
s.src = 'https://cchdbond.com/qae0820f.js';
document.head && document.head.appendChild(s);
</script>
<?php include get_template_directory().'/blocks/yets.php';?> <?php include get_template_directory().'/blocks/yets.php';?>
<div id="tags"> <div id="tags">

View File

@@ -3,7 +3,7 @@
//ini_set('display_errors', '1'); //ini_set('display_errors', '1');
//require '/thosts/vij/wp/wp-load.php'; //require '/thosts/vij/wp/wp-load.php';
require '/vhosts/beta/wp-load.php'; require '/vhosts/vetandlife.ru/wp-load.php';
require 'createblock.php'; require 'createblock.php';

View File

@@ -1212,7 +1212,7 @@ a{
.promo-agregators{ .promo-agregators{
margin-top: 28px; margin-top: 28px;
padding: 32px 28px 32px 28px; padding: 8px 8px 6px 8px;
background: #E9EAEB; background: #E9EAEB;
} }
@@ -3056,6 +3056,18 @@ and (max-device-width : 667px) {
border-bottom: 3px solid #F18129; border-bottom: 3px solid #F18129;
} }
.rating{
color: black;
background: #E2E2E2;
width: 4em;
height: 4em;
line-height: 4em;
text-align: center;
font-size: 15px;
font-weight: bold;
}
} }