{"id":516,"date":"2019-07-21T20:05:20","date_gmt":"2019-07-21T20:05:20","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/07\/21\/remove-top-link-in-magento-2\/"},"modified":"2025-05-22T16:16:08","modified_gmt":"2025-05-22T10:46:08","slug":"remove-top-link-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/remove-top-link-in-magento-2\/","title":{"rendered":"How to Remove Top Link in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Previously, I had given the programmatic solution to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/add-top-link-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">add top link in Magento 2<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, you may need to perform the reverse action, i.e.,&nbsp;<em><strong>remove top link in Magento 2<\/strong><\/em>. There can be many reasons to do so. For example, you had added a link for testing purpose but now changed your mind. Or, you want to disable new registration temporarily. In cases when you want to change the labels of top links or override the default functionality, you can also use the below solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method to Remove Top Link in Magento 2:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create&nbsp;<strong>default.xml<\/strong>&nbsp;at&nbsp;<strong><em>Vendor\/Extension\/view\/frontend\/layout\/<\/em><\/strong> folder<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"..\/..\/..\/..\/..\/..\/..\/lib\/internal\/Magento\/Framework\/View\/Layout\/etc\/page_configuration.xsd\">\n    &lt;body>\n        &lt;referenceBlock name=\"register-link\" remove=\"true\" \/>           &lt;!--for Create Account Link-->\n        &lt;referenceBlock name=\"authorization-link\" remove=\"true\" \/>      &lt;!--for Sign In Link  -->\n        &lt;referenceBlock name=\"wish-list-link\" remove=\"true\" \/>          &lt;!--for WishList Link-->\n        &lt;referenceBlock name=\"my-account-link\" remove=\"true\" \/>         &lt;!--for My Account Link-->\n    &lt;\/body>\n&lt;\/page><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Implement the above code and remove top links in the Magento 2 store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Efficiently manage the top links for an optimized and easy-to-shop frontend!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019d be very grateful if you help share this helpful post on social media to fellow developers!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, I had given the programmatic solution to&nbsp;add top link in Magento 2. However, you may need to perform the reverse action, i.e.,&nbsp;remove top link&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-516","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=516"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":15336,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/516\/revisions\/15336"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}