- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Shopify. How to add a custom link in the login menu
January 12, 2016
This tutorial will show you how to add a custom link in the login menu in Shopify.
Shopify. How to add a custom link in the login menu
-
Open your Shopify admin panel and navigate to Online Store -> Themes. Click the Edit HTML/CSS button near your template:
-
Locate and open theme.liquid file and find the following code on lines 82-93:
-
{% if customer %}
- {{ customer.first_name | truncate:15 }}
- {% assign X = 'layout.header.logout' | t %}{% if X.size > 0 %}{{ X }}{% else %}Log out{% endif %} {% else %}
- {% assign X = 'layout.header.login' | t %}{% if X.size > 0 %}{{ X }}{% else %}Log in{% endif %} {% if shop.customer_accounts_optional %}
- {% assign X = 'layout.header.create_account' | t %}{% if X.size > 0 %}{{ X }}{% else %}Create an account{% endif %} {% endif %} {% endif %}
-
Before the closing:
tag add a list item with your link inside of it, for example:
.- http://www.google.com">Custom link
-
After editing the code will look as follows:
-
{% if customer %}
- {{ customer.first_name | truncate:15 }}
- {% assign X = 'layout.header.logout' | t %}{% if X.size > 0 %}{{ X }}{% else %}Log out{% endif %} {% else %}
- {% assign X = 'layout.header.login' | t %}{% if X.size > 0 %}{{ X }}{% else %}Log in{% endif %} {% if shop.customer_accounts_optional %}
- {% assign X = 'layout.header.create_account' | t %}{% if X.size > 0 %}{{ X }}{% else %}Create an account{% endif %} {% endif %} {% endif %}
- Custom link
-
Now your custom link has appeared in the Account menu:
Thank you for watching our tutorial. Now you know how to add a custom link in the login menu in Shopify.
Feel free to check the detailed video tutorial below: