®Magento Tutorials

Magento how to hook home page footer left & right column

Here are the steps to add a new block to the home page footer left and right column in Magento:

Create a new module in Magento by creating a directory in app/code with the name of the module.

Create a new layout file in the view/frontend/layout directory of the module with the name of the layout and .xml extension.

In this layout file, you can add the following code:


<referenceContainer name=”footer-container”>
<block class=”Magento\Framework\View\Element\Template” name=”footer.left” template=”Vendor_Module::footer_left.phtml”/>
<block class=”Magento\Framework\View\Element\Template” name=”footer.right” template=”Vendor_Module::footer_right.phtml” after=”footer.left”/>

Create a new template file in the view/frontend/templates directory of the module with the name of the template and .phtml extension.

Add your custom HTML and PHP code to the template file you have created.

Clear the Magento cache.

You can check the updated footer left and right columns in the home page of your website.

Note: The above steps are for Magento 2, but it may vary depending on the version of Magento you are using.

About zohaibk

We develop useful addons for #E-Commerce and #CRM software to provide extra features.#PrestaShop,#Magento,#SugarCRM,#Vtiger & #Android #apps
View all posts by zohaibk →