5

I've gotten rid of the links but 'subscribe' field is still there. How is this referenced? Meaning I want it gone, not just hidden. Seems like this should be easy but can't figure it out - Thanks.

1
  • Did you create a custom theme? Mar 14, 2017 at 23:20

2 Answers 2

9

This block is defined in the Magento Newsletter module. So you can remove the block entirely via xml layout file. Create this file in your own theme or add to it.

app/design/frontend/YourCompany/your_theme/Magento_Theme/layout/default.xml

<?xml version="1.0"?>
<page layout="1column" 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>

This will remove the footer subscribe form from every page of your site.

2
  • Thank you very much, that worked. Although for some reason, the only default.xml I can get to work is housed in 'vendor/magento/theme-frontend-blank/Magento_Theme/layout/'
    – user51798
    Mar 15, 2017 at 3:26
  • 1
    @user51798 Your changes with any file in the vendor folder will not be permanent. The next time you update Magento your changes will be lost. You need to create your own Magento theme and use it to extend and override blocks like this.
    – wallyjaw
    Mar 15, 2017 at 5:05
0

put below code in default.xml inside your theme folder

<referenceBlock name="form.subscribe" remove="true"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.