Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re:

How can I apply theme settings to custom liquid?

heartofjuno
Visitor
3 0 0

Hi. I'm creating a custom liquid with additional links to policies I want to include on my site. However, the theme settings have no effect on it. I added code to change the font colors and size to the custom liquid, but that overrides the main theme settings. I am not sure how to go about this. How do I add the theme font settings to the custom liquid so it's cohesive?

 

Screen Shot 2023-02-19 at 7.51.41 AM.png

Replies 3 (3)

EcomGraduates
Shopify Partner
781 68 112

hello there  

 

To ensure that your custom liquid file uses the same font settings as the rest of your theme, you can include the theme's font settings in your liquid file.

One way to do this is to use the font filter with the global object. Here's an example of how to use it to get the font settings for the body text:

{% assign font_settings = settings.global | font: 'body' %}

You can then use the font_settings variable to set the font family, size, and color for your custom links. For example:

 

<a href="/terms-of-service" style="font-family: {{ font_settings.font_family }}; font-size: {{ font_settings.font_size }}px; color: {{ font_settings.color }};">Terms of Service</a>

 

 


 If this fixed your issue, likes and accepting as a solution are highly appreciated
|  Build an online presence with our custom-built Shopify Theme: EcomifyTheme
|  Check out our reviews: Trustpilot Reviews
|  We are Shopify Partners: EcomGraduates Shopify Partner



heartofjuno
Visitor
3 0 0

i am not sure if i'm doing this correctly. but i couldn't get it to work. i'll just wait until shopify developers have this issue fixed on the back end.

Screen Shot 2023-03-07 at 3.34.04 PM.png

arbosphere
Visitor
1 0 0

Hey, were you able to solve this issue? I have the same problem and am not sure what theme files to edit to make it work.