How to Remove the Footer Links from Magento 2

Magento 2 Logo

Great software development can turn difficult problems into easy tasks. But sometimes, the opposite happens and apparently easy problems become difficult tasks.

Magento makes some tasks way harder than they should be.

Magento 2 arrives with a simple list of five links in the footer. Removing them should be easy, but it’s surprisingly convoluted and difficult.

When you first install a new Magento site, you’ll see five links in the footer:

  • Privacy and Cookie Policy
  • Search Terms
  • Orders and Returns
  • Advanced Search
  • Contact Us

This image below shows where the links are visible on a Magento site. These five links are completely separate items and each one needs to be edited individually.

footer links menu

Getting Started

To remove the first four menu links, you need to edit your site’s code. This tutorial assumes that you are using overrides to safely modify Magento. The original files are in the /vendor/magento/ folder, but please do not edit those. You should make a copy of these files and place them in the /app/code/ folder.

How to remove the Privacy and Cookie Policy link

  • Login to your site’s files.
  • Go to /app/code/Magento/Cms/view/frontend/layout/default.xml
  • Comment out Line 13 so it looks like this:

{codecitation}<!–referenceBlock name=”footer_links”>{/codecitation}

How to remove the Search Terms link

  • Login to your site’s files.
  • Go to /app/code/Magento/Search/view/frontend/layout/default.xml
  • Comment out Line 13 so it looks like this:

{codecitation}<!–referenceBlock name=”footer_links”>{/codecitation}

How to remove the Orders and Returns link

  • Login to your site’s files.
  • Go to /app/code/Magento/Search/view/frontend/layout/default.xml
  • Comment out Line 16 so it looks like this:

{codecitation}<!–referenceBlock name=”footer_links”>{/codecitation}

How to remove the Advanced Search link

  • Login to your site’s files.
  • Go to /app/code/Magento/Sales/view/frontend/layout/default.xml
  • Comment out Line 13 so it looks like this:

{codecitation}<!–referenceBlock name=”footer_links”>{/codecitation}

How to remove the Contact Us link

The final link can be removed from the Magento admin area:

  • Log in to your Magento admin.
  • Go to Stores > Configuration.
  • Click “Contacts” in the left menu.
  • Click the “Contact Us” slider so it opens.
  • Set “Enable Contact Us” to “No”.
  • Click “Save Config”.

disable contact us

Summary

This should be much easier. This menu should absolutely be a block that’s editable in the Magento admin. But, if you do need to remove these links, at least you now know how.

Instructor

  • Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Blog Rating
Subscribe
Notify of
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Eduardo Weidman Barijan

Thank you for sharing this solution. I have trouble with Magento 2 as well. It took me a long time to understand theme development in Magento 1.x and then 2 comes and turns everything upside down. I had a work that had to be done in Magento 2 but I was struggling a lot with overriding the theme, removing stuff, moving stuff just like this post shows and in the end I decided to do the work in Woocommerce. I like Magento and I wish the next major release would fix such issues and make it easier for a developer to do their work because right now you do need a rocket science degree to modify anything in Magento 2.

Yaroslav Tobolich

This decision is wrong. The footer links need to delete with help referenceBlock in default.xml in your installed theme. In folder Magento_Theme/layout create default.xml and write .

seemakwatra141@gmail.com

@steve : If we are commenting “” this in vendor folder,,, it works. But doesn’t work when we create same folder structure in app/code/magento….

@Yaroslav Tobolich : This hides complete footer… But I want only default footer links to hide.

MJ

This is what I did, I hid the footer via this method, then created mine by writing html and css, added the css to the Less theme files and the HTML to a Static Block and using a Widget, I set it to show on all pages at the bottom.

So now if a text / link is needed to be edited, an admin with backend access can change it.

5
0
Would love your thoughts, please comment.x
()
x