How To Remove Block From Layout For Magento 2

There is a block which I would like to remove it, How can I do from layout file for Magento 2

To remove the block via layout for Magento 2

  1. Locate the layout file from your theme
  2. Inserting the following codes based on your block name.
    Here is the example

    <?xml version="1.0"?>
    <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
        <body>
                <referenceBlock name="block_name" remove="true"/>
        </body>
    </page>
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments