I am using my own custom version of the RWD theme and want to remove the account button with the icon next to it and replace it with two simple account|login links that go to the account login/signup page.

Can anyone tell me how this can be achieved?


Try this in your local.xml

<?xml version="1.0"?>
<layout version="0.1.0">


        <reference name="top.links">

            <!-- Remove cart, checkout and wishlist top links -->
            <remove name="checkout_cart_link" />
            <remove name="wishlist_link" />

            <!-- Remove my account top links -->
            <action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>



        <!-- getting rid of login logout links in top .links -->
            <reference name="top.links">
                <action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>
            <reference name="top.links">
                <action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>


In your phtml use this

                        <?php if(Mage::getSingleton('customer/session')->isLoggedIn()){ ?>
                        $customer = Mage::getSingleton('customer/session')->getCustomer();
                        $cusname = $customer->getFirstname().' '.$customer->getLastname();
                        $name = substr($cusname,0,18)."..";
                        <a href="<?php echo Mage::getUrl('checkout/cart'); ?>"><?php echo "Hi "."$name"  ?> &nbsp;</a>
                            <ul  class="subaccount">
                            <li><a href="<?php echo Mage::getUrl('customer/account'); ?>">Profile</a></li>
                            <li><a href="<?php echo Mage::getUrl('sales/order/history'); ?>">Order</a></li>
                            <li><a href="<?php echo Mage::getUrl('wishlist'); ?>">Wishlist</a></li>
                            <li><a href="<?php echo Mage::getUrl('newsletter/manage'); ?>">Newsletter</a></li>
                            <li><a href="<?php echo Mage::getUrl('review/customer'); ?>">Review</a></li>
                            <li><a href="<?php echo Mage::getUrl('customer/account/logout'); ?>">Logout</a></li>
                        <?php } else { ?>
                        <a href="<?php echo Mage::getUrl('customer/account/login'); ?>">Login / Register</a>
                        <?php } ?>
  • But how do I remove the current account button first? – Oli Tuck Mar 26 '16 at 16:14
  • You want to remove Account from top link? – Magento 2 Mar 26 '16 at 16:15
  • I want to remove the account button with the icon that has a dropdown, and just replace it with two simple links (account|login) that go to the account page. – Oli Tuck Mar 26 '16 at 16:28
  • Your answer just edited the items in the dropdown. I want to delete the account button all together. And replace it with something else – Oli Tuck Mar 26 '16 at 16:34
  • Can you please share your url or Update Screen shot – Magento 2 Mar 26 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.