Shopify themes, liquid, logos, and UX
So my code for the Account Icon in the header was this below. The reason why I have used this is so when clients click on the Account Icon it takes them to a website instead. I would like this button reversed to original. When I delete the website only (in bold) from the code, the Account Icon takes me to a '404 Page Not Found' on my website instead of Account login for Shopify or something. How can I do this?
{%- capture account_icon -%}
<a
class="header__icon-touch header__icon-touch--account"
href=https://lsaccountingfirm.joinportal.com/login?step=signIn
aria-label="{{ 'general.accessibility.go_account' | t }}"
target="_blank"
>
{% render 'icon-button' with icon: 'account' %}
</a>
{%- endcapture -%}
Solved! Go to the solution
This is an accepted solution.
replace your code with this one
{%- capture account_icon -%}
<a
class="header__icon-touch header__icon-touch--account"
href="{{ routes.account_url }}"
aria-label="{{ 'general.accessibility.go_account' | t }}"
>
{% render 'icon-button' with icon: 'account' %}
</a>
{%- endcapture -%}
This is an accepted solution.
replace your code with this one
{%- capture account_icon -%}
<a
class="header__icon-touch header__icon-touch--account"
href="{{ routes.account_url }}"
aria-label="{{ 'general.accessibility.go_account' | t }}"
>
{% render 'icon-button' with icon: 'account' %}
</a>
{%- endcapture -%}
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025