diff --git a/wp-content/themes/twentytwentyfour/assets/css/test1-shared-shell.css b/wp-content/themes/twentytwentyfour/assets/css/test1-shared-shell.css index 6c25ec08..b3bc95b7 100644 --- a/wp-content/themes/twentytwentyfour/assets/css/test1-shared-shell.css +++ b/wp-content/themes/twentytwentyfour/assets/css/test1-shared-shell.css @@ -41,6 +41,12 @@ flex-direction: column; } +.test1-shared-shop-page { + min-height: 100vh; + display: flex; + flex-direction: column; +} + .test1-shared-cart-page .site-main { flex: 1 0 auto; } @@ -61,6 +67,11 @@ padding-bottom: 26px; } +.test1-shared-shop-page .site-main { + flex: 1 0 auto; + padding-bottom: 26px; +} + .test1-shared-cart-page .classic-footer { margin-top: auto; } @@ -78,6 +89,10 @@ margin-top: auto; } +.test1-shared-shop-page .classic-footer { + margin-top: auto; +} + .test1-shared-shell .site-header { position: sticky; top: 0; diff --git a/wp-content/themes/twentytwentyfour/functions.php b/wp-content/themes/twentytwentyfour/functions.php index a77d777c..ebd78673 100644 --- a/wp-content/themes/twentytwentyfour/functions.php +++ b/wp-content/themes/twentytwentyfour/functions.php @@ -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; } diff --git a/wp-content/themes/twentytwentyfour/page-shop.php b/wp-content/themes/twentytwentyfour/page-shop.php new file mode 100644 index 00000000..d430c162 --- /dev/null +++ b/wp-content/themes/twentytwentyfour/page-shop.php @@ -0,0 +1,33 @@ + +> +
+ + + + +> + + + +