add spaadv ce in news

This commit is contained in:
2024-07-07 19:03:39 +03:00
parent b93f49e259
commit e7dfc26f59

View File

@@ -128,36 +128,22 @@ if ( $pets_cat ){
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> --> <!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
<?//endwhile;?> <?//endwhile;?>
<!-- Yandex.RTB R-A-4145099-6 -->
<div id="yandex_rtb_R-A-4145099-6"></div>
<script>
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
"blockId": "R-A-4145099-6",
"renderTo": "yandex_rtb_R-A-4145099-6"
})
})
</script>
<?$random_adv = rand(0, 1); <?if (function_exists('ex_adv_get_banner')):
if ($random_adv == 0):?> //место под новостью 1
<div id="unit_102382"><a href="https://smi2.ru/" >Новости СМИ2</a></div> $ya_news = ex_adv_get_banner( 11 );
<script type="text/javascript" charset="utf-8"> if ($ya_news !== ''):?>
(function() { <?=$ya_news?>
var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.async = true; <?endif?>
sc.src = '//smi2.ru/data/js/102382.js'; sc.charset = 'utf-8';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sc, s);
}());
</script>
<?else:?>
<div class="smi24__informer smi24__auto" data-smi-blockid="29761"></div>
<script>(window.smiq = window.smiq || []).push({});</script>
<div class="smi24__informer smi24__auto" data-smi-blockid="29760"></div>
<script>(window.smiq = window.smiq || []).push({});</script>
<?endif;?>
<?//место под новостью 2
$smi = ex_adv_get_banner( 12 );
if ($smi !== ''):?>
<?=$smi?>
<?endif?>
<?endif?>
<?php include get_template_directory().'/blocks/yets.php';?> <?php include get_template_directory().'/blocks/yets.php';?>