add new adv plugin and suppoer webp

This commit is contained in:
argoexpert press
2025-04-18 19:44:26 +03:00
parent f3b21a96e4
commit 5aeb9f4cdb
13 changed files with 156 additions and 138 deletions

View File

@@ -1,5 +1,5 @@
<a href="https://forum.rusgrain.org?erid=2VSb5zKAzHv" target="_blank" style="display: block; width: 240px; height: 400px; text-decoration: none; margin: 0 auto;">
<div id="banner" class="banner-left" style="position: relative; width: 100%; height: 100%; background: url('https://agroexpert.press/wp-content/uploads/2025/03/forum_4-marta-2025-goda_480h800.jpg') no-repeat center/cover;">
<div id="banner" class="banner-left" style="position: relative; width: 100%; height: 100%; background: url('https://agroexpert.press/wp-content/uploads/2025/03/forum_4_-2025_480h800-01.jpg') no-repeat center/cover;">
<div id="countdown" style="position: absolute; bottom: 24px; right: 0px; font-family: Impact, Charcoal, sans-serif; font-size: 15px; text-transform: uppercase; background-color: green; color: white; padding: 6px 15px 6px 19px; border-bottom: 2px solid white;">
Осталось 00 дней
</div>

View File

@@ -12,7 +12,7 @@ if ($pinned_post):
<a href="<?php echo get_permalink($pinned_post->ID); ?>" class="article-item__image-container">
<?=show_post_image( $pinned_post->ID ); ?>
<?=render_webp_picture_by_post( $pinned_post->ID ); ?>
<div class="tag article-item__tag"><?=esc_html(get_category_name($pinned_post));?></div>
</a>
<div class="article-item__text">

View File

@@ -8,7 +8,7 @@ if ($pinned_post) :
<a href="<?php echo get_permalink($pinned_post->ID); ?>" class="hero-banner">
<div class="hero-banner__bg">
<?= show_post_image($pinned_post->ID); ?>
<?=render_webp_picture_by_post( $pinned_post->ID );?>
</div>
<p class="hero-banner__main">Главное</p>
<div class="hero-banner__content">

View File

@@ -9,24 +9,14 @@ if ($query->have_posts()) {
$query->the_post();
get_template_part('content', 'post', ['full_width' => $post_count === 1 && $large_first_image]);
if ($post_count === ($large_first_image ? 5 : 4)) : ?>
<?if (function_exists('ex_adv_get_banner')):
$middle_desk = ex_adv_get_banner(13);
if ($middle_desk !== ''):?>
<div class="banner-middle desktop">
<?=$middle_desk?>
</div>
<?endif?>
<?$middle_mob = ex_adv_get_banner(14);
if ($middle_mob !== ''):?>
<div class="banner-middle mobile">
<?=$middle_mob?>
</div>
<?endif?>
<?endif?>
<?if (function_exists('krutilka_placement')):?>
<div class="banner-middle desktop">
<?=krutilka_placement( 'middle-desktop' );?>
</div>
<div class="banner-middle mobile">
<?=krutilka_placement( 'middle-mobile' );?>
</div>
<?endif?>
<?php endif; ?>
<?php
}