Published on

How to show header and footer at checkout page in Magento 2

  • avatar
    Bal Singh

So in case you want to show header and footer at checkout page then follow the following steps

  1. Create a checkout_index_index.xml file inside your frontend theme. Path would be like
  1. Copy and Paste the following code in this file.
<?xml version="1.0"?> 
    <page xmlns:xsi="" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page\_configuration.xsd"> 
            <referenceContainer name="footer-container" remove="false"/> 
            <referenceBlock name="minicart" remove="false" /> 
            <referenceBlock name="" remove="false" /> 
            <referenceContainer name="header.panel" remove="false" /> 
            <referenceBlock name="catalog.topnav" remove="false"/> 

  Note: Once you have added above script into xml file, then Top Menu may not be visible at checkout page. Because it may be hidden in checkout page style. So you need to show it by CSS. You need to overwrite the following style in your theme css file.
From: checkout-index-index .nav-sections, .checkout-index-index .nav-toggle { display: none;}
To:  checkout-index-index .nav-sections, .checkout-index-index .nav-toggle { display: block;}