правки test1

This commit is contained in:
2026-04-05 20:56:03 +03:00
parent f0870321e5
commit ede86f4573
3 changed files with 72 additions and 1 deletions

View File

@@ -366,6 +366,29 @@ function twentytwentyfour_cart_template( $template ) {
}
add_filter( 'template_include', 'twentytwentyfour_cart_template', 20 );
/**
* Use a lightweight custom template for the WooCommerce shop page.
*
* @since Twenty Twenty-Four 1.0
*
* @param string $template Resolved template path.
* @return string
*/
function twentytwentyfour_shop_template( $template ) {
if ( ! function_exists( 'is_shop' ) || ! is_shop() ) {
return $template;
}
$custom_template = get_theme_file_path( 'page-shop.php' );
if ( file_exists( $custom_template ) ) {
return $custom_template;
}
return $template;
}
add_filter( 'template_include', 'twentytwentyfour_shop_template', 20 );
/**
* Enqueue standalone landing assets for the page slug "test1".
*
@@ -465,7 +488,7 @@ add_action( 'wp_enqueue_scripts', 'twentytwentyfour_test1_assets', 100 );
* @return void
*/
function twentytwentyfour_test1_shared_shell_assets() {
if ( ! ( ( function_exists( 'is_checkout' ) && is_checkout() && ! is_order_received_page() ) || ( function_exists( 'is_cart' ) && is_cart() ) || is_page( 'faq' ) || is_page( 'contacts' ) || is_page( 'delivery' ) || is_page( 'service' ) ) ) {
if ( ! ( ( function_exists( 'is_checkout' ) && is_checkout() && ! is_order_received_page() ) || ( function_exists( 'is_cart' ) && is_cart() ) || ( function_exists( 'is_shop' ) && is_shop() ) || is_page( 'faq' ) || is_page( 'contacts' ) || is_page( 'delivery' ) || is_page( 'service' ) ) ) {
return;
}