Top Magento Hosting Providers for 2018
Check'em Out

Remove and Add Links in Magento 2 Footer

Footer is an important section of any ecommerce store. It is the last section of the store pages, and thus the last chance to convince the visitors to stay on the store and buy more.

I have seen queries on several Magento forums about how to edit links and add new links in the footer of Magento 2 stores. So today, I am going to teach you how to remove links and add new links in the footer of Magento 2 stores.

As always, when customizing Magento 2 stores, it is highly recommended that you create a custom module to ensure that the core files remain untouched.

Steps to Follow

Create a Custom Module

Create module.xml in app/code/Magenticians/Mymodule/etc and paste the following code in it:

Create registration.php in app/code/Magenticians/Mymodule and paste the following code in it:

Remove Link(s) and Add New Link(s) to the Magento 2 Footer

Suppose you wish to remove the Privacy Policy link and want to add Create an Account link in Magento footer.

Create default.xml file in app/code/Magenticians/Mymodule/view/frontend/layout.

To remove Privacy Policy link from Magento 2 footer, you need to add the following code in the  layout file:

Here are some link blocks you could easily remove:

  • Privacy and Cookie Policy: privacy-policy-link
  • Search Terms: search-term-popular-link
  • Contact Us: contact-us-link
  • Advanced Search: catalog-search-advanced-link
  • Orders and Returns: sales-guest-form-link

To add Create an Account link in Magento 2 footer, you need to add the following code in layout file:

In the code above, I have added the Create an Account link in Magento 2 footer according to the scenario.

The final default.xml file will look like this:

Run CLI Commands

Launch the SSH terminal and connect to your store. Go to the root directory of your store and run the following commands:

Go to the store and you will see the result:

Edit and Add New Link in Magento 2 Footer - Result

Final Words

You can now easily edit footer of your Magento 2 store. The process is simple and allows you to remove and add links in Magento 2 footer to fit your store marketing strategy. As always, if you need help, just drop a comment and I will get back to you.

 

About Author

Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.