How can I change text of 'Log In' link when logged in to read 'Account'

Solved
Grant-Senior
Excursionist
36 3 6

Hi there,

I'm using the Debut theme. On my client's request I've managed to change the Log In icon in the page header so that it says 'Log In' but now I need to change it to say 'Account' once an account user has logged in.

Once logged in I can see that the 'Log In' link url is saying 'myshopify.co./account' but unless the text actually reflects this users won't know how to find their account details. How do I change things so that the text reflects the login status?

Grant

0 Likes
24by7themes
Navigator
382 61 69

Contact me, you need expert person.

Shopify Plus Expert, Quality Service Provider, CONTACT ME for any kind of solutions.
Please like and accept solution. SKYPE -> live:gp21111990
0 Likes
Jivan_Suhagiya
Shopify Partner
494 68 104

This is an accepted solution.

Just check condition that user is logged in or not
In header.liquid file

{% if customer %}
              <a href="{{ routes.account_url }}" class="site-header__icon site-header__account">
                {% include 'icon-login' %}
                <span class="icon__fallback-text">{{ 'layout.customer.account' | t }}</span>
              </a>
            {% else %}
              <a href="{{ routes.account_login_url }}" class="site-header__icon site-header__account">
                {% include 'icon-login' %}
                <span class="icon__fallback-text">{{ 'layout.customer.log_in' | t }}</span>
              </a>
            {% endif %}
If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder
Grant-Senior
Excursionist
36 3 6

Thank you Jivan, that was very helpful! I appreciate it.

Grant

0 Likes