From f72b5b0a39b4c0eb23216bf02e22f4314e38fa04 Mon Sep 17 00:00:00 2001 From: "Anton.AE" Date: Sun, 5 Apr 2026 22:24:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20test1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/twentytwentyfour/functions.php | 16 +++++++++++++--- .../themes/twentytwentyfour/page-delivery.php | 2 +- .../themes/twentytwentyfour/page-service.php | 2 +- .../template-parts/test1-shared-footer.php | 12 ++++++------ .../template-parts/test1-shared-header.php | 4 ++-- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/wp-content/themes/twentytwentyfour/functions.php b/wp-content/themes/twentytwentyfour/functions.php index 0d2b5087..611d5c8a 100644 --- a/wp-content/themes/twentytwentyfour/functions.php +++ b/wp-content/themes/twentytwentyfour/functions.php @@ -224,7 +224,7 @@ add_action( 'init', 'twentytwentyfour_pattern_categories' ); * @return string */ function twentytwentyfour_test1_template( $template ) { - if ( ! is_page( 'test1' ) ) { + if ( ! is_front_page() && ! is_page( 'test1' ) ) { return $template; } @@ -406,7 +406,7 @@ add_filter( 'template_include', 'twentytwentyfour_shop_template', 20 ); * @return void */ function twentytwentyfour_test1_assets() { - $use_test1_assets = is_page( array( 'test1', 'faq', 'contacts', 'delivery', 'service' ) ); + $use_test1_assets = is_front_page() || is_page( array( 'test1', 'faq', 'contacts', 'delivery', 'service' ) ); if ( ! $use_test1_assets ) { return; @@ -559,6 +559,16 @@ function twentytwentyfour_seo_context_page_id() { return 0; } + if ( is_front_page() ) { + $test1_page = get_page_by_path( 'test1' ); + + if ( $test1_page instanceof WP_Post ) { + return (int) $test1_page->ID; + } + + return (int) get_queried_object_id(); + } + if ( is_page( array( 'test1', 'faq', 'contacts', 'delivery', 'service' ) ) ) { return (int) get_queried_object_id(); } @@ -991,7 +1001,7 @@ function twentytwentyfour_water_delivery_empty_cart_cta() { return; } ?> -
+
Сервис на месте Подъем воды, замена бутыли и вывоз пустой тары по запросу. - Перейти к заказу воды + Перейти к заказу воды diff --git a/wp-content/themes/twentytwentyfour/page-service.php b/wp-content/themes/twentytwentyfour/page-service.php index 06361dbf..d4b2327c 100644 --- a/wp-content/themes/twentytwentyfour/page-service.php +++ b/wp-content/themes/twentytwentyfour/page-service.php @@ -92,7 +92,7 @@
- Выбрать воду + Выбрать воду Связаться с менеджером
diff --git a/wp-content/themes/twentytwentyfour/template-parts/test1-shared-footer.php b/wp-content/themes/twentytwentyfour/template-parts/test1-shared-footer.php index f118a74f..d67251ab 100644 --- a/wp-content/themes/twentytwentyfour/template-parts/test1-shared-footer.php +++ b/wp-content/themes/twentytwentyfour/template-parts/test1-shared-footer.php @@ -10,7 +10,7 @@