How can I add only footer section in my checkout page I tried this code

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"> 
        <referenceContainer name="page.main.title" remove="true" />
        <referenceBlock name="top.search" remove="true" />
        <referenceBlock name="catalog.compare.link" remove="true" />
        <referenceBlock name="catalog.topnav" remove="true"/>
        <referenceContainer name="footer-container"  remove="false"/>

But this gives me header and footer both I am not able to get footer alone.

  • just keep <referenceContainer name="footer-container" remove="false"/> code inside body tag – Pawan Feb 11 '19 at 19:01
  • I tried didn’t work – summu Feb 11 '19 at 19:02
  • what the file name and path for above code ? – Pawan Feb 11 '19 at 19:07
  • Checkout_index_index and it's in Magento_checkout module which I override – summu Feb 11 '19 at 19:08
  • please add above file at {Package}\{theme}\Magento_Checkout\layout\override\theme\Magento\blank and try once. – Pawan Feb 11 '19 at 19:17

You can this code in your theme file :-


<?xml version="1.0"?>
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="header.panel" remove="true" />
    <referenceBlock name="top.search" remove="true" />
    <referenceContainer name="footer-container"  remove="false"/>
    <referenceBlock name="top.links" remove="true" />
    <referenceBlock name="minicart" remove="true" />

i hope this will helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.