Ok, this sounds like it should be really simple but its driving me crazy. All I want to do is change the title above the Newsletter subscribe form in the footer of Magento 2. I have a child theme of Luma.

I thought I could just copy module-newsletter from vendor/magento/module-newsletter in to my theme directory and it would override. But this doesn't seem to be the case. There must be a way of altering the /vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml file from my child theme?


at your theme directory and the file path


Vendor: the first char Uppercase

themename: lowercase


Create a module and rewrite subscribe class


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
     <preference for="Magento\Newsletter\Block\Subscribe" type="Namespace\Modulename\Block\Subscribe"/>  

Block file app/code/Namespace/Modulename/Block/Subscribe.php as below


namespace Namespace\Modulename\Block;

use Magento\Framework\View\Element\Template;

class Subscribe extends Template

    public function __construct(Template\Context $context,array $data = [])
        parent::__construct($context, $data);

    public function beforeToHtml(\Magento\Newsletter\Block\Subscribe $originalBlock)


your phtml file app/code/Namespace/Modulename/view/frontend/templates/subscribe.phtml


You don't need to create any custom module for overriding phtml file. All you need to do is override the file in your theme at this location

app/design/frontend/[VENDOR NAME]/[THEME NAME]/Magento_Newsletter/templates/subscribe.phtml

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.