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

Solved
Highlighted
Tourist
16 0 2

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
Highlighted
Trailblazer
195 29 31

Contact me, you need expert person.

Still not satisfied!!! contact me
Is it good solution? Yes, please Like.
0 Likes
Highlighted
Shopify Partner
276 28 53

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
Give a try to Shopify APP: https://apps.shopify.com/short-track
1 Like
Tourist
16 0 2

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

Grant

0 Likes