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:

<!–referenceBlock name="footer_links">

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:

<!–referenceBlock name="footer_links">

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:

<!–referenceBlock name="footer_links">

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:

<!–referenceBlock name="footer_links">

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.


About the author

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.