add partners

This commit is contained in:
argoexpert press
2024-05-25 17:35:08 +03:00
parent 641399598f
commit 088d38c3a8
8 changed files with 87 additions and 25 deletions

View File

@@ -0,0 +1,42 @@
<?php
$partners = new WP_Query([
'category_name' => 'partners-en',
'post_type' => 'post',
'posts_per_page' => 10,
'orderby' => 'date',
'order' => 'ASC'
]);
?>
<?php get_header( 'en' ); ?>
<div class="content-middle articles-wrapper">
<?php get_template_part('partials/rubrics-mobile'); ?>
<div class="section-title">
<h1 class="section-title__title"><?= get_queried_object()->name ?></h1>
</div>
<div class="articles-preview">
<?
if ($partners->have_posts()) :
while ($partners->have_posts()) :
$partners->the_post();
?>
<a href="<?= get_permalink(); ?>" class="partner-item">
<div>
<?if ( has_post_thumbnail() ) {
the_post_thumbnail( 'thumbnail' ); // Это выведет самую маленькую превьюшку
}?>
</div>
<div class="partner-item__text-container">
<p class="subtitle-16"><?= get_the_title(); ?></p>
</div>
</a>
<?php
endwhile;
endif;
?>
</div>
<? custom_pagination($partners); ?>
</div>
<?php
get_footer( 'en' ); ?>

View File

@@ -7,15 +7,7 @@ if ($query->have_posts()) {
while ($query->have_posts()) {
$post_count++;
$query->the_post();
get_template_part('en/content', 'post-en', ['full_width' => $post_count === 1 && $large_first_image]);
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; ?>
get_template_part('en/content', 'post-en', ['full_width' => $post_count === 1 && $large_first_image]);?>
<?php
}
wp_reset_postdata();