Shopify themes, liquid, logos, and UX
Hi, I have added my favicon to the theme, but it isn't showing.
I tried adding this code from another solution in the community, but with no luck:
{%- if settings.favicon != blank -%} <link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png"> {%- endif -%}
My site is: okholmstudio.dk
Does anyone have a solution to this?
Hi @simone11 ,
Did you upload your favicon image to the favicon section? And even then it is not visible?
Yes, I have uploaded the favicon. Image attached
Use this code:
{%- if settings.favicon != blank -%}
<link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
{%- endif -%}
change img_url into image_url
How do I find the image url for the favicon?
This is your code
{%- if settings.favicon != blank -%}
<link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png">
{%- endif -%}
Replace your code with this
{%- if settings.favicon != blank -%}
<link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
{%- endif -%}
then try to upload the favicon image.
It doesn't work... unfortunately
Then try this,
1. upload the favicon image with the size of 32x32
2. copy the link of uploaded favicon image from the file
3. comment this line in theme.liquid
{%- if settings.favicon != blank -%}
<link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
{%- endif -%}
3. paste this link
<link rel="icon" type="image/png" href="https://cdn.shopify.com/s/files/1/0015/8292/3812/files/Best-buy-tips-fav.jpg">
where in href attribute you just paste the copied image link and save it.
then check this is working or not.
If after this favicon will show then i have check your theme code for why favicon is not showing.
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