add adv partials

This commit is contained in:
argoexpert press
2024-05-22 21:18:03 +03:00
parent 097eefe379
commit 4fa7a19433
7 changed files with 90 additions and 7 deletions

View File

@@ -1,8 +1,5 @@
<?php
$menu_location = 'primary';
$locations = get_nav_menu_locations();
$menu_id = $locations[$menu_location];
$menu_id = 761;
$menu_items = wp_get_nav_menu_items($menu_id);
?>
<?php foreach ($menu_items ?: [] as $menu_item):?>

10
partials/rtb-floor.php Executable file
View File

@@ -0,0 +1,10 @@
<!-- Yandex.RTB R-A-7761284-1 -->
<script>
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
"blockId": "R-A-7761284-1",
"type": "floorAd",
"platform": "touch"
})
})
</script>

10
partials/rtb-single.php Executable file
View File

@@ -0,0 +1,10 @@
<!-- Yandex.RTB R-A-7761284-2 -->
<div id="yandex_rtb_R-A-7761284-2"></div>
<script>
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
"blockId": "R-A-7761284-2",
"renderTo": "yandex_rtb_R-A-7761284-2"
})
})
</script>