All things Shopify and commerce
So I have defined schema for typography, in which i want to select font for body.
So I have defined schema, in settings_schema.json file
{
"name": "typography",
"settings": [
{
"type": "font_picker",
"label": "Body font",
"id": "Body_font",
"default": "poppins_n4"
}
]
}
$body_font: {{ settings.Body_font }};
body{
background_color: $bg_color;
color: $text_color;
font-size: 24px;
font-family: $body_font;
font-style: normal;
}
h1,h2,h3,h4,h5,h6,p,a{
font-family: $body_font;
}
now, in theme editor it shows that you have selected poppins font like this
but when I open store this font has not been applied to body. and I inspected it shows font-family: fontDrop. so what is it?? I think it is error regarding loading the fonts. but I have refreshed page like hundreds of times and also cleared browser cache.
Please solve it.
Hi!
'font' is an object in shopify schema, you have to use 'family', it should be like this: settings.Body_font.family.
more information here: https://shopify.dev/docs/api/liquid/objects/font
Having the same issue and no solution. Did you get any solution?
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025