7

I have newsletter signup block on my front page that I want to remove. However I can't seem to find it anywhere. With development mode I can see that it is being rendered from app/design/frontend/TemplateMonster/Spiceli/Magento_Newsletter/templates/subscribe.phtml and that it is Magento\Newsletter\Block\Subscribe from this two information is there a way to can remove it?

enter image description here

9

You can remove this block completely via layout with remove="true":

app/design/frontend/TemplateMonster/Spiceli/Magento_Newsletter/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="form.subscribe" remove="true"/>
    </body>
</page>
  • 2
    thank you that works; just so I know where was this define in the first place? – Ahdee Mar 12 '17 at 5:32
  • Take a look this layout: vendor/magento/module-newsletter/view/frontend/layout/default.xml – Khoa TruongDinh Mar 12 '17 at 5:33

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.