Shopify themes, liquid, logos, and UX
I'm trying to hide the icon of the little person next to the cart icon in my store. I'm using the Lorenza theme. Ideally, I'd like to hide the profile icon unless someone is already signed in but if I don't have a way to qualify that then I'm ok hiding it all the time. I tried using the code:
.header__icon header__icon--account {
display: none!important;
}
and it didn't work. What am I doing wrong?
Store: https://66cdcb-86.myshopify.com/
Password: chohme
Solved! Go to the solution
This is an accepted solution.
@jasminsharp97 you can place the following code in the theme.liquid file before the closing </head>-Tag
{% unless customer %}
<style>
.header__icon.header__icon--account{
display:none!important;
}
</style>
{% endunless %}
Hiding the Icon will only apply to those who are not logged in.
Hello @jasminsharp97
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
@media (min-width: 60em) {
.header--default .header__icon--account{
display: none !important;
}
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Hi @jasminsharp97 ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<style>
@media (min-width: 60em) {
.header--default .header__icon--account{
display: none !important;
}
}
</style>
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
.header__icon.header__icon--account {
display: none!important;
}
Can you try this code @jasminsharp97
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
This is an accepted solution.
@jasminsharp97 you can place the following code in the theme.liquid file before the closing </head>-Tag
{% unless customer %}
<style>
.header__icon.header__icon--account{
display:none!important;
}
</style>
{% endunless %}
Hiding the Icon will only apply to those who are not logged in.
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
{% unless customer %}
<style>
.header__icon.header__icon--account{
display: none !important;
}
</style>
{% endunless %}
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Hi @jasminsharp97 for the answers using the liquid conditions, if the theme has it use a site wide custom-liquid section or block if possible instead of editing theme code directly to not break automatic theme upgradability.
If available site wide would often be either in the header or footer section groups in the theme visual editor.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024