Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
{%- unless settings.type_header_font.system? and settings.type_body_font.system? -%}
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>
{%- endunless -%}
Can someone please describe what's happening in this statement? I know it's looking at a theme setting variable, but there are some things I don't understand.
1. No matter what I set the font to, system or Shopify font, the statement runs true.
2. Is the question mark on the end turning the value into a boolean?
3. What does `system` describe? It looks like an object key, but I can't tell what it's set to.
Thank you
Hi there, I believe that is referring to this:
If you aren't using a system font for both of these, then it will add the prefetch link to the document in order to fetch the fonts faster. You'll need to set both type_header_font and type_body_font to a system font if you don't want this to resolve.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025