Sarathlal N

Remove top links one by one in Magento 1 using local.xml file

Just use below code snippet in theme’s local.xml file and it will remove all Magento top links one by one.

 <reference name="root">
 <reference name="top.links">
 <!-- Removes 'My Account' link -->
 <action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
 <!-- Removes 'Wishlist' link -->
 <!-- for Magento 1.3.x -->
 <action method="removeLinkByUrl"><url helper="wishlist/"/></action>
 <!-- for Magento 1.4.x -->
 <remove name="wishlist_link"/>
 <!-- Removes 'My Cart' AND 'Checkout' links-->
 <remove name="checkout_cart_link"/>
 <!-- To re-add 'My Cart' or 'Checkout' after removing both 
 <block type="checkout/links" name="checkout_cart_link_custom">
 <action method="addCartLink"></action>
 <action method="addCheckoutLink"></action>
 <!-- Removes 'Log In' link -->
 <reference name="top.links">
 <action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
 <!-- Remove Register link --> 
 <action method="removeLinkByUrl"><url helper="customer/getRegisterUrl"/></action>

 <!-- Removes 'Log Out' link-->
 <reference name="top.links">
 <action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>

Need Help?

Do you need any help on Magento 1? I'm happy to help you.

Contact Me

Recent Posts

  1. Get variation product data on selecting variation options - WooCommerce
  2. Add TinyMCE WYSIWYG (Rich text area) meta box - WordPress
  3. Reorder product tabs in single product page - WooCommerce
  4. Download webpage for offline reading - wget
  5. Remove product tabs in single product page - WooCommerce

Your Questions / Comments

If you found this article interesting, found errors, or just want to discuss about them, please get in touch.