Shopify themes, liquid, logos, and UX
Hi,
I want to add a button that says Login to my header instead of the cart on the homepage
just a 1px outline black button.
my site is https://lux360.net
To add a black, 1px outlined "Login" button in place of the cart icon on your homepage header in Shopify, follow these steps:
<button style="border: 1px solid black; padding: 5px 10px;">Login</button>
If you have other questions, I am willing to answer them more.
Best regards,
Daisy
<a href="{{ routes.cart_url }}"
class="navlink navlink--cart"
data-drawer-toggle="drawer-cart">
{% if section.settings.use_icons %}
{{ cart_icon }}
<span class="visually-hidden">{{ 'layout.cart.title' | t }}</span>
{{ cart_status }}
{% else %}
<span class="navtext cart__status__parens">
{{ 'layout.cart.title' | t }}
{{ cart_status }}
</span>
{% endif %}
</a>
this is my code. Can you let me know what to replace thank you
Any colitis for this?
Based on your provided code, if you need to replace the href attribute with a specific cart URL, you can substitute {{ routes.cart_url }} with your actual cart URL. Here's how you can do it:
<a href="https://yourwebsite.com/cart"
class="navlink navlink--cart"
data-drawer-toggle="drawer-cart">
{% if section.settings.use_icons %}
{{ cart_icon }}
<span class="visually-hidden">{{ 'layout.cart.title' | t }}</span>
{{ cart_status }}
{% else %}
<span class="navtext cart__status__parens">
{{ 'layout.cart.title' | t }}
{{ cart_status }}
</span>
{% endif %}
</a>
If your cart URL is https://example.com/cart, update the href like this:
<a href="https://example.com/cart"
class="navlink navlink--cart"
data-drawer-toggle="drawer-cart">
<!-- Rest of the code remains the same -->
</a>
Testing: Always test the updated link to confirm it directs users to the correct cart page without issues.
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