0

Can I remove footer from a cms page ? and I added that page using admin panel .

default.xml  file 


<?xml version="1.0"?>
<!--
/**
 * Copyright © Infortis. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <body>

        <!-- <move name="breadcrumbs" destination="mycustom.div" before="-" /> -->
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>

        <move element="customer-account-navigation-orders-link" destination="customer_account_navigation" before="customer-account-navigation-address-link"/>
        <move element="customer-account-navigation-wish-list-link" destination="customer_account_navigation" after="customer-account-navigation-address-link"/>
        <move element="customer-account-navigation-my-credit-cards-link" destination="customer_account_navigation" after="customer-account-navigation-product-reviews-link"/>

        <referenceBlock name="base-footer-container">

            <!-- Static blocks -->
            <block class="Magento\Cms\Block\Block" name="block_footer_links_sec">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_links_sec</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_social_section">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_social_section</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_brands_banner">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_brands_banner</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_end_liner">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_end_liner</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_candidio_sec">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_candidio_sec</argument>
                </arguments>
            </block>
        </referenceBlock>

    </body>

</page>

2 Answers 2

3

Add below code in your CMS page > Design > Layout Update XML

<referenceContainer name="footer-container" remove="true" />

Clear Cache. It will remove Footer from Specific CMS page where you add above code.

5
  • This should work, was just about to post this solution.
    – codestr
    Dec 19, 2017 at 17:19
  • @AbhishekPanchal I don't know why this is not working , I have cleared cache aswell. I think footer has been added custom. So where I can check its referenceContainer name?
    – Learner
    Dec 20, 2017 at 6:56
  • You can check footer name in ‘Magento_Theme/layout/default.xml’ Dec 20, 2017 at 10:38
  • I attached default.xml . and I just wanted to remove that block block_footer_candidio_sec . how Can I ?
    – Learner
    Dec 20, 2017 at 10:40
  • for Complete header ??
    – Manish
    Aug 2, 2018 at 6:13
3

In backend, Content -> Pages -> Edit the right page -> tab "Design", field "Layout Update XML".

<referenceContainer name="content">
    <referenceBlock name="block_footer_candidio_sec" remove="true" />
</referenceContainer>

Write me if you have any issues.

10
  • no its not working :(
    – Learner
    Dec 19, 2017 at 19:23
  • Did you clear a cache? Dec 19, 2017 at 19:46
  • I don't know why this is not working , I have cleared cache aswell. I think footer has been added custom. So where I can check its referenceContainer name?
    – Learner
    Dec 20, 2017 at 6:56
  • Could you show me Theme_Root/Magento_Theme/layout/default.xml? You can use pastebin.com service for post whole file Dec 20, 2017 at 7:28
  • done , I want to remove ' block_footer_candidio_sec' . check updated question. thank you
    – Learner
    Dec 20, 2017 at 7:32

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.