2024-03-01 17:47:03 +03:00
|
|
|
<?php
|
|
|
|
|
global $wp_query;
|
|
|
|
|
$large_first_image = $args['large_first_image'] ?? true;
|
|
|
|
|
$post_count = 0;
|
|
|
|
|
$query = $args['query'] ?? $wp_query;
|
|
|
|
|
if ($query->have_posts()) {
|
|
|
|
|
while ($query->have_posts()) {
|
|
|
|
|
$post_count++;
|
|
|
|
|
$query->the_post();
|
|
|
|
|
get_template_part('content', 'post', ['full_width' => $post_count === 1 && $large_first_image]);
|
2024-03-12 09:16:19 +03:00
|
|
|
if ($post_count === ($large_first_image ? 5 : 4)) : ?>
|
|
|
|
|
<div class="banner-middle desktop">
|
|
|
|
|
<?php if (function_exists('banners_conf_display')) banners_conf_display('content_banner_desktop'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="banner-middle mobile">
|
|
|
|
|
<?php if (function_exists('banners_conf_display')) banners_conf_display('content_banner_mobile'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php
|
2024-03-01 17:47:03 +03:00
|
|
|
}
|
|
|
|
|
wp_reset_postdata();
|
|
|
|
|
}
|
2024-03-12 09:16:19 +03:00
|
|
|
?>
|