Magento2 How to remove a block from layout

To remove a block in Magento2 from layout use the following code snippet, add this in your theme default.xml or in your custom module layout file.



¬†Where in the above referenceBlock we are given remove=”true” it tell magento to remove the block with name that we specified from layout.

The following two tabs change content below.

Arshad M

Magento Certified Developer at Codilar
Passionate full stack eCommerce web developer, Magento Certified Developer.

Latest posts by Arshad M (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *