Hi,
This is my website, https://the-triangle-club.myshopify.com. The password is hi1234. I want to add a logout button in the header (as an icon) once people have logged in. But, I am unsure how to do this. Please advise.
Best,
Chichi0114
A user seeks help adding a logout button (as an icon) to their Shopify store header that appears only when customers are logged in.
Proposed Solution:
{% if customer %}) to display a logout link when users are authenticated and a login option otherwise./account/logout.Current Status:
Hi,
This is my website, https://the-triangle-club.myshopify.com. The password is hi1234. I want to add a logout button in the header (as an icon) once people have logged in. But, I am unsure how to do this. Please advise.
Best,
Chichi0114
Hi @chichi0114
Please use this code
{% if customer %}
Logout
{% else %}
Login CODE here
{% endif %}
If this solution is worked, then please Like this and Mark this as accepted solution!
Shuvam
Hi Laddisahsi, I was wondering where I should add that code. Thank you, Chichi0114