1

how do I remove the "Sign Out" link from the header panel but still keep the "Sign Out" link in the drop down menu (Which contain "My Account" and "My Wish List" links) next to it?

If I put this code in my theme's default.xml <referenceBlock name="header.panel"> <referenceBlock name="authorization-link" remove="true"/> </referenceBlock>, the "Sign Out" link in drop down is removed but the "Sign Out" link in the panel is not, which is the opposite of what I'm trying to achieve.

enter image description here

2
  • Find any solution for this?
    – Ramya
    Commented Feb 12, 2020 at 8:32
  • you got it working? I am facing same issue. Can you please help.
    – Nauman
    Commented Apr 20, 2022 at 7:05

3 Answers 3

2

GO to Your theme directory...

app/design/frontend/Yourtheme/Xyz/Magento_Customer/layout/default.xml

write below line...

<referenceBlock name="authorization-link-login" remove="true"/>

php bin/magento cache:flush and check your frontend

1

You could go to the file:

vendor/magento/module-customer/view/frontend/templates/account/link/authorization.phtml

Copy it and overwrite it in your own theme and delete the li that contains the sign out link.

0

In this file app/design/frontend/custom_vendor/theme_name/Magento_Theme/layout/default.xml, add this line,

<move element="customer" destination="header.links" after="-"/>

After that clear cache and check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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