WooCommerce header-shop.php - how to display your header on the shopping cart page

There is a website http://rezultatnalitso.sparkmedia.pro/shop - here in the mobile version, your hedear is loaded from header-shop.php.

And here http://rezultatnalitso.sparkmedia.pro/cart also in the mobile version, the header is loaded from header.php.

Question: how to make it so that and on the page http://rezultatnalitso.sparkmedia.pro/cart loaded its header from header-shop.php.

I know about get_header('shop'), but I don't understand where insert it.

Author: KAGG Design, 2018-05-13

1 answers

The cart page is a regular site page that contains the [woocommerce_cart] shortcode. So to the very beginning of your file header.php you can add a check that we are on the bucket page and output the corresponding header:

if ( class_exists( 'WooCommerce' ) && is_cart() ) {
    get_header('shop');
} else {
    // текущий код header.php
}
 1
Author: KAGG Design, 2018-05-13 12:50:04