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

@@ -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();

View File

@@ -2560,6 +2560,15 @@ h3,
margin-right: 12px;
}
.lang-switch{
font-weight: bold;
font-size: 1.2em;
}
.lang-switch a{
color: #ff6900;
}
@media (max-width: 768px) {
.nav {

View File

@@ -8,6 +8,20 @@
margin: 0 12px;
}
.rating {
margin-right: 12px;
}
.lang-switch{
font-weight: bold;
font-size: 1.2em;
}
.lang-switch a{
color: #ff6900;
}
@media (max-width: 768px) {
.nav {
display: grid;
@@ -20,6 +34,10 @@
.nav .menu-item:nth-child(2n - 2) {
justify-self: right;
}
.rating {
margin-right: 0;
}
}
.menu-item a {

View File

@@ -931,6 +931,13 @@ function use_custom_template_for_en_subcategories($template) {
if (is_category()) {
$category = get_queried_object();
if ($category->term_id == 762) { //parthers
$new_template = locate_template('en/category-partners-en.php');
if ($new_template) {
return $new_template;
}
}
// Проверяем, является ли текущая категория подрубрикой "EN"
$parent_id = $category->parent;
if ($parent_id && $parent_id == get_cat_ID('EN')) {

View File

@@ -72,7 +72,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<nav class="nav header__nav">
<?php get_template_part('partials/menu-primary'); ?>
</nav>
<div class="lang-switch"><a href="<?php echo home_url();?>/en">EN</a></div>
<div class="header__right">
<div class="header__actions">
<a href="/search/">

50
page-for-advertisers.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
/*
Template Name: Шаблон страницы рекламодателей
*/
$advertisers = new WP_Query([
'post_type' => 'advertiser',
'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"><?= the_title() ?></h1>
</div>
<div class="articles-preview">
<div class="advert-item">
<div class="advert-item__block">
<p>For advertising on our web-site and social media:</p>
</div>
<div class="advert-item__block">
<h2 class="advert-item__block-title_margin-lg subtitle-18">Contacts</h2>
<div class="advert-item__contacts">
<div class="advert-item__contact-item">
<div class="advert-item__avatar-container"><img src="https://agroexpert.press/wp-content/uploads/2024/02/whatsapp-image-2024-02-29-at-18.52.25.jpeg" alt="" class="advert-item__contacts-avatar"></div>
<div class="advert-item__contact-info">
<p class="advert-item__contact-name subtitle-13">Daniil Trofimov</p>
<p class="advert-item__contact-position text-13">Advertisement Manager</p>
<p class="advert-item__contact-phone subtitle-13">Tel.: <a href="tel:79263663700"> +7 (926) 366 37 00</a></p>
<p class="advert-item__contact-email text-13"><a href="mailto:pr@agroexpert.press">pr@agroexpert.press</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="<?= home_url() ?>" class="articles-preview__show-next">On top</a>
<div class="articles__spacer-container">
<div class="articles__spacer"></div>
<div class="articles__spacer"></div>
</div>
</div>
<?php
get_footer( 'en' ); ?>

View File

@@ -11,17 +11,3 @@
<?php get_template_part('en/latest-legislation-posts-en'); ?>
<div class="banner-left desktop">
<?php if (function_exists('banners_conf_display')) banners_conf_display('right_sidebar_banner_desktop_1'); ?>
</div>
<div class="banner-left mobile">
<?php if (function_exists('banners_conf_display')) banners_conf_display('right_sidebar_banner_mobile_1'); ?>
</div>
<div class="banner-left desktop">
<?php if (function_exists('banners_conf_display')) banners_conf_display('right_sidebar_banner_desktop_2'); ?>
</div>
<div class="banner-left mobile">
<?php if (function_exists('banners_conf_display')) banners_conf_display('right_sidebar_banner_mobile_2'); ?>
</div>