How to Remove Default Footer Links in Magento 2
Footer is one of the elements that often gets the least amount of attention by store owners.
The default Magento 2 has five footer links.
Once you install Magento 2, you’ll see these five links in the footer section:
- Search Terms
- Privacy and Cookie Policy
- Advanced Search
- Orders and Returns
- Contact Us
The default behavior of Magento 2 in the footer link looks like below:
However, based on business requirements, Magento 2 store may not want to display these footer links.
The reasons may be that those links need to be placed on the top and the visitor needs to see them at once they land on your page. Or, those links need not be on the page at all!
Now, if you want to remove default footer links in Magento 2, use the method below:
Method to Remove Default Footer Links in Magento 2
Use the below code in default.xml at <Vendor>\<theme>\Magento_Theme\layout.
1 |
<referenceBlock name="footer_links" remove="true"/> |
You can remove footer links separately using the block name of the link as shown below.
Search Terms: search-term-popular-link
Privacy and Cookie Policy: privacy-policy-link
Advanced Search: catalog-search-advanced-link
Orders and Returns: sales-guest-form-link
Contact Us: contact-us-link
Use the above link names to particularly remove the footer link.
The output of the above code displays as shown below image:
That’s it
You can also add and edit footer links in Magento 2 if required.
If you have any doubts regarding this post, just mention them in the Comments section below.
I would be happy to help.
Feel free to share the solution with Magento Community via social media.
Thank You.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
2 Comments
thanks it worked
Thank You Chhavi!
We Feel Grateful.