From 07a4f5b19dc815a0e549be23191dace50fe1db02 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 23 Oct 2026 13:58:48 +0300 Subject: [PATCH] =?UTF-8?q?task=2017081=20|=20=D0=BF=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BB=20=D1=87=D0=B0=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=82=D1=8F=D0=B6=D0=BA=D0=B8=20=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2=20=D1=81=20requirements=20=D0=BF=D0=BE=20spe?= =?UTF-8?q?cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/hantico/assets/css/style.css | 24 +++++++++ .../themes/hantico/assets/scss/style.scss | 24 +++++++++ .../themes/hantico/template-parts/formats.php | 4 +- .../themes/hantico/template-parts/getapp.php | 7 ++- .../themes/hantico/template-parts/related.php | 52 +++++++++++++++++-- .../themes/hantico/template-parts/reviews.php | 6 ++- .../hantico/templates/template-courier.php | 1 - 7 files changed, 107 insertions(+), 11 deletions(-) diff --git a/wp-content/themes/hantico/assets/css/style.css b/wp-content/themes/hantico/assets/css/style.css index d129a90..496105a 100644 --- a/wp-content/themes/hantico/assets/css/style.css +++ b/wp-content/themes/hantico/assets/css/style.css @@ -3181,6 +3181,30 @@ h4 { .getapp-title { color: #fff; } + +.getapp--custom-title .getapp-body__left { + min-width: 0; +} +.getapp--custom-title .getapp-title { + font-size: clamp(24px, 11.5691px + 3.3149vw, 54px); + font-weight: 700; + line-height: 1.1; + letter-spacing: -0.01em; + overflow-wrap: anywhere; +} +.getapp-title__ending { + display: block; +} +@media (min-width: 1280px) { + .getapp--custom-title .getapp-title { + width: 731px; + max-width: none; + } + .getapp--custom-title .getapp-stores { + margin-top: 55px; + } +} + .getapp-descr { margin-top: 25px; font-size: 18px; diff --git a/wp-content/themes/hantico/assets/scss/style.scss b/wp-content/themes/hantico/assets/scss/style.scss index ad93736..02716bb 100644 --- a/wp-content/themes/hantico/assets/scss/style.scss +++ b/wp-content/themes/hantico/assets/scss/style.scss @@ -4235,6 +4235,30 @@ h4 { } } + +.getapp--custom-title .getapp-body__left { + min-width: 0; +} +.getapp--custom-title .getapp-title { + font-size: clamp(24px, 11.5691px + 3.3149vw, 54px); + font-weight: 700; + line-height: 1.1; + letter-spacing: -0.01em; + overflow-wrap: anywhere; +} +.getapp-title__ending { + display: block; +} +@media (min-width: 1280px) { + .getapp--custom-title .getapp-title { + width: 731px; + max-width: none; + } + .getapp--custom-title .getapp-stores { + margin-top: 55px; + } +} + @media (hover: hover) { .blog-item__img-link:hover img { transform: scale(1.15); diff --git a/wp-content/themes/hantico/template-parts/formats.php b/wp-content/themes/hantico/template-parts/formats.php index 2c6b2a7..14f1501 100644 --- a/wp-content/themes/hantico/template-parts/formats.php +++ b/wp-content/themes/hantico/template-parts/formats.php @@ -11,10 +11,10 @@ $formats_id = wp_unique_id('work-formats-');
-

+

Выберите подходящий формат работы

-

+

Выбирайте удобный график, формат и условия работы

diff --git a/wp-content/themes/hantico/template-parts/getapp.php b/wp-content/themes/hantico/template-parts/getapp.php index 05d5e0f..de5d6cc 100644 --- a/wp-content/themes/hantico/template-parts/getapp.php +++ b/wp-content/themes/hantico/template-parts/getapp.php @@ -1,14 +1,17 @@ -
+
-

Скачай и начни уже сегодня

+

Скачай и начни получать заказы на уже завтра!Скачай и начни уже сегодня

+
Hantico есть на всех платформах. Установи приложение, пройди регистрацию — и через 15 минут ты готов к первому заказу
+
diff --git a/wp-content/themes/hantico/template-parts/related.php b/wp-content/themes/hantico/template-parts/related.php index b5248da..479b5ab 100644 --- a/wp-content/themes/hantico/template-parts/related.php +++ b/wp-content/themes/hantico/template-parts/related.php @@ -1,15 +1,44 @@ $current_post_id]) as $field_group) { + foreach (acf_get_fields($field_group) ?: [] as $field) { + if ($field['name'] === 'article_category') { + return; + } + } + } + } + + $selected_ids = []; + foreach ($selected_articles as $row) { + $article = $row['post'] ?? null; + $article_id = $article instanceof WP_Post ? $article->ID : (int) $article; + if ($article_id > 0 && $article_id !== $current_post_id) { + $selected_ids[] = $article_id; + } + } $terms = get_the_terms($current_post_id, 'article_category'); $related_args = [ - 'post_type' => $post_type, + 'post_type' => $post_type === 'news' ? 'news' : 'article', 'posts_per_page' => 6, 'post__not_in' => [$current_post_id], 'orderby' => 'date', 'order' => 'DESC' ]; - if ($terms) { + if ($selected_ids) { + $related_args['post_type'] = 'article'; + $related_args['post__in'] = $selected_ids; + $related_args['posts_per_page'] = -1; + $related_args['orderby'] = 'post__in'; + } elseif ($terms && !is_wp_error($terms)) { $term_ids = wp_list_pluck($terms, 'term_id'); $related_args['tax_query'] = [ [ @@ -20,6 +49,21 @@ ]; } $related_query = new WP_Query($related_args); + if ($selected_ids) { + // WP_Query removes duplicates; restore the exact order and rows from ACF. + $posts_by_id = []; + foreach ($related_query->posts as $selected_post) { + $posts_by_id[$selected_post->ID] = $selected_post; + } + $related_query->posts = []; + foreach ($selected_ids as $selected_id) { + if (isset($posts_by_id[$selected_id])) { + $related_query->posts[] = $posts_by_id[$selected_id]; + } + } + $related_query->post_count = count($related_query->posts); + } + if ($related_query->have_posts()) : $title = $post_type === 'news' ? 'Другие новости' : 'Вам также может понравиться'; ?> diff --git a/wp-content/themes/hantico/template-parts/reviews.php b/wp-content/themes/hantico/template-parts/reviews.php index cc52abe..7dcabf9 100644 --- a/wp-content/themes/hantico/template-parts/reviews.php +++ b/wp-content/themes/hantico/template-parts/reviews.php @@ -1,5 +1,7 @@
-

Отзывы наших клиентов

-
Живые истории водителей и курьеров, которые подключились к Hantico
+

Что говорят о Hantico

+
Реальные истории , которые подключились к Hantico
diff --git a/wp-content/themes/hantico/templates/template-courier.php b/wp-content/themes/hantico/templates/template-courier.php index ef25c35..88aa26b 100644 --- a/wp-content/themes/hantico/templates/template-courier.php +++ b/wp-content/themes/hantico/templates/template-courier.php @@ -16,7 +16,6 @@ Template Name: Курьерам -