правки test1

This commit is contained in:
2026-04-05 22:24:45 +03:00
parent 4ba4a1e8f9
commit f72b5b0a39
5 changed files with 23 additions and 13 deletions

View File

@@ -224,7 +224,7 @@ add_action( 'init', 'twentytwentyfour_pattern_categories' );
* @return string * @return string
*/ */
function twentytwentyfour_test1_template( $template ) { function twentytwentyfour_test1_template( $template ) {
if ( ! is_page( 'test1' ) ) { if ( ! is_front_page() && ! is_page( 'test1' ) ) {
return $template; return $template;
} }
@@ -406,7 +406,7 @@ add_filter( 'template_include', 'twentytwentyfour_shop_template', 20 );
* @return void * @return void
*/ */
function twentytwentyfour_test1_assets() { 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 ) { if ( ! $use_test1_assets ) {
return; return;
@@ -559,6 +559,16 @@ function twentytwentyfour_seo_context_page_id() {
return 0; 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' ) ) ) { if ( is_page( array( 'test1', 'faq', 'contacts', 'delivery', 'service' ) ) ) {
return (int) get_queried_object_id(); return (int) get_queried_object_id();
} }
@@ -991,7 +1001,7 @@ function twentytwentyfour_water_delivery_empty_cart_cta() {
return; return;
} }
?> ?>
<div class="water-empty-cart-cta"><a class="button" href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>"><?php esc_html_e( 'Перейти в каталог', 'twentytwentyfour' ); ?></a></div> <div class="water-empty-cart-cta"><a class="button" href="<?php echo esc_url( home_url( '/#catalog' ) ); ?>"><?php esc_html_e( 'Перейти в каталог', 'twentytwentyfour' ); ?></a></div>
<?php <?php
} }

View File

@@ -86,7 +86,7 @@
<strong>Сервис на месте</strong> <strong>Сервис на месте</strong>
<span>Подъем воды, замена бутыли и вывоз пустой тары по запросу.</span> <span>Подъем воды, замена бутыли и вывоз пустой тары по запросу.</span>
</article> </article>
<a class="button delivery-cta" href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Перейти к заказу воды</a> <a class="button delivery-cta" href="<?php echo esc_url( home_url( '/#catalog' ) ); ?>">Перейти к заказу воды</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -92,7 +92,7 @@
</div> </div>
<div class="hero-actions hero-actions-spaced"> <div class="hero-actions hero-actions-spaced">
<a class="button" href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Выбрать воду</a> <a class="button" href="<?php echo esc_url( home_url( '/#catalog' ) ); ?>">Выбрать воду</a>
<a class="ghost-button" href="<?php echo esc_url( home_url( '/contacts/' ) ); ?>">Связаться с менеджером</a> <a class="ghost-button" href="<?php echo esc_url( home_url( '/contacts/' ) ); ?>">Связаться с менеджером</a>
</div> </div>
</div> </div>

View File

@@ -10,7 +10,7 @@
<div class="container classic-footer-shell"> <div class="container classic-footer-shell">
<div class="classic-footer-main"> <div class="classic-footer-main">
<div class="classic-footer-col brand-col"> <div class="classic-footer-col brand-col">
<a class="brand" href="<?php echo esc_url( home_url( '/test1/' ) ); ?>" aria-label="Перейти на страницу test1"> <a class="brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="Перейти на главную страницу">
<span class="brand-mark" aria-hidden="true"> <span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/> <path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
@@ -27,11 +27,11 @@
<div class="classic-footer-col"> <div class="classic-footer-col">
<h3>Навигация</h3> <h3>Навигация</h3>
<div class="footer-links"> <div class="footer-links">
<a href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Каталог</a> <a href="<?php echo esc_url( home_url( '/#catalog' ) ); ?>">Каталог</a>
<a href="<?php echo esc_url( home_url( '/test1/#delivery' ) ); ?>">Доставка воды в Севастополе</a> <a href="<?php echo esc_url( home_url( '/delivery/' ) ); ?>">Доставка воды в Севастополе</a>
<a href="<?php echo esc_url( home_url( '/test1/#business' ) ); ?>">Доставка воды в офис</a> <a href="<?php echo esc_url( home_url( '/service/' ) ); ?>">Доставка воды в офис</a>
<a href="<?php echo esc_url( home_url( '/test1/#faq' ) ); ?>">Частые вопросы</a> <a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>">Частые вопросы</a>
<a href="<?php echo esc_url( home_url( '/test1/#contacts' ) ); ?>">Контакты</a> <a href="<?php echo esc_url( home_url( '/contacts/' ) ); ?>">Контакты</a>
</div> </div>
</div> </div>

View File

@@ -12,7 +12,7 @@ $test1_header_mode = isset( $test1_header_mode ) ? $test1_header_mode :
<header class="site-header"> <header class="site-header">
<div class="container"> <div class="container">
<div class="header-row"> <div class="header-row">
<a class="brand" href="<?php echo esc_url( home_url( '/test1/' ) ); ?>" aria-label="Перейти на страницу test1"> <a class="brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="Перейти на главную страницу">
<span class="brand-mark" aria-hidden="true"> <span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/> <path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
@@ -58,7 +58,7 @@ $test1_header_mode = isset( $test1_header_mode ) ? $test1_header_mode :
<div class="mobile-panel" id="mobilePanel"> <div class="mobile-panel" id="mobilePanel">
<div class="mobile-card"> <div class="mobile-card">
<nav class="mobile-nav" aria-label="Мобильная навигация"> <nav class="mobile-nav" aria-label="Мобильная навигация">
<a href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Каталог</a> <a href="<?php echo esc_url( home_url( '/#catalog' ) ); ?>">Каталог</a>
<a href="<?php echo esc_url( home_url( '/delivery/' ) ); ?>">Условия доставки</a> <a href="<?php echo esc_url( home_url( '/delivery/' ) ); ?>">Условия доставки</a>
<a href="<?php echo esc_url( home_url( '/service/' ) ); ?>">Для дома и офиса</a> <a href="<?php echo esc_url( home_url( '/service/' ) ); ?>">Для дома и офиса</a>
<a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>">FAQ</a> <a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>">FAQ</a>