Magento – Remove cms block from only cms home page

home-pagelayoutmagento2

I have created a cms block and using widget added inside header page container, now I want to remove that block from only home page.

How can i achieve this?

Widget screenshot to display block

enter image description here

Best Answer

Go to

Admin -> Content -> Pages -> Edit CMS page (which you want to update) -> Design -> Layout Update XML

And then, post this below code in that field

<referenceContainer name="content.top">
   <referenceBlock name="form.popup.subscribe" remove="true"/>
</referenceContainer>

You can set name of referenceContainer and referenceBlock name which you want to remove.

Hope, It will helpful for you !!

Related Topic