Hello @kurage_2025 you’re using your own custom font and want to apply it only to specific elements — the “Related products” heading on product pages and the “Sort by” label on collection pages — here’s exactly how to do that in the Dawn theme or any similar Shopify theme:
Step 1: Upload the Custom Font
-
Go to Online Store > Themes in your Shopify admin.
-
Find your live theme and click Actions > Edit code.
-
In the Assets folder, click Add a new asset.
-
Upload your custom font file (.woff, .woff2, or .ttf format recommended).
Let’s assume your file is called MyCustomFont.woff2.
Step 2: Declare the Font in CSS
-
Still in the Assets folder, open base.css (or theme.css / styles.css, depending on your theme version).
-
At the very top, add the @font-face declaration like this:
@font-face {
font-family: 'MyCustomFont';
src: url('{{ 'MyCustomFont.woff2' | asset_url }}') format('woff2');
font-weight: normal;
font-style: normal;
}
Step 3: Target Specific Elements Only
Now let’s write CSS that only targets:
. The “Related Products” heading (we’ll use a class or section selector based on Dawn’s structure).
. The “Sort by” label on collection pages.
Add this to the bottom of base.css:
/* Related Products heading on product page */
.product-recommendations h2 {
font-family: 'MyCustomFont', sans-serif;
}
/* "Sort by" label on collection page */
.facets__form label,
.facets__label {
font-family: 'MyCustomFont', sans-serif;
}
Optional (Inspect to Verify)
If your theme is heavily customized and the selectors above don’t work, here’s how to verify:
-
Open your site in Chrome.
-
Right-click on the “Related products” heading or “Sort by” label and click Inspect.
-
Check the class name and adjust your CSS selector accordingly.
For example, if the heading is:
## Related products
Then your CSS would be:
.related-products__heading {
font-family: 'MyCustomFont', sans-serif;
}
Results
This setup will:
. Load your custom font once from Shopify’s server.
. Apply it only to the elements you specified.
. Not affect the rest of your theme’s typography.
Thank you 