Solved

How to Change Font Settings Just for Blog Posts?

IlluminateLabs
Explorer
126 0 16

I want all H2 on our blog articles to have an increased font size, and all text links in our blog articles to be in blue color (#0000FF). 

These desired settings are different from the rest of our site. How can I achieve this? I tried using ".article-template .rte" and it didn't work.

Accepted Solution (1)
Nick_Marketing
Shopify Partner
1487 336 464

This is an accepted solution.

Try adding this code at the very bottom of theme.scss.

 

 

[itemprop="articleBody"] h2 {
  font-size: 20px;
}

[itemprop="articleBody"]
p a.text-link{
 text-decoration: none;
 color: #0000FF !important;
}

 

 

P.S. You have an interesting product!🙂🙂

Nick | Ecommerce & Marketing Technology Consultant | Toronto, CANADA
- For consulting work availability, please send me a Private Message or submit a ✍️Contact Form.
- For FREE Shopify Tutorials, Subscribe to my YouTube channel (▶️ Ecommerce TV).

View solution in original post

Replies 8 (8)

Nick_Marketing
Shopify Partner
1487 336 464

Please provide the site and blog link so that others can review.

Nick | Ecommerce & Marketing Technology Consultant | Toronto, CANADA
- For consulting work availability, please send me a Private Message or submit a ✍️Contact Form.
- For FREE Shopify Tutorials, Subscribe to my YouTube channel (▶️ Ecommerce TV).
Nick_Marketing
Shopify Partner
1487 336 464

This is an accepted solution.

Try adding this code at the very bottom of theme.scss.

 

 

[itemprop="articleBody"] h2 {
  font-size: 20px;
}

[itemprop="articleBody"]
p a.text-link{
 text-decoration: none;
 color: #0000FF !important;
}

 

 

P.S. You have an interesting product!🙂🙂

Nick | Ecommerce & Marketing Technology Consultant | Toronto, CANADA
- For consulting work availability, please send me a Private Message or submit a ✍️Contact Form.
- For FREE Shopify Tutorials, Subscribe to my YouTube channel (▶️ Ecommerce TV).
IlluminateLabs
Explorer
126 0 16

You're the man, thanks so much. 

And appreciate the product feedback! Would be happy to give you a personalized 70% discount code -- if you're interested in trying any of our products, just message us for the code.

Nick_Marketing
Shopify Partner
1487 336 464

Ah, thank you! I've bookmarked your site for reference once the time comes to replenish supplements.

Should you will have any other questions, feel free to PM me directly.

Best,

Nick

Nick | Ecommerce & Marketing Technology Consultant | Toronto, CANADA
- For consulting work availability, please send me a Private Message or submit a ✍️Contact Form.
- For FREE Shopify Tutorials, Subscribe to my YouTube channel (▶️ Ecommerce TV).
IlluminateLabs
Explorer
126 0 16

Sounds good. I have one further question if you don't mind. Do you know of a command to force all links to be opened in a new tab for blog posts? I know how to do this on an individual but not global basis, and it's super inefficient to manually add this to every link in our articles.

Nick_Marketing
Shopify Partner
1487 336 464

You can achieve this with some custom JavaScript or theme modification. I don't have a solution from the top of my head, but here are a few examples that may give some hints.
https://help.shopify.com/en/manual/online-store/themes/os/customize/open-external-links-in-new-tab
https://ditly.uk/force-all-external-links-on-shopify-to-open-a-new-tab/

Nick | Ecommerce & Marketing Technology Consultant | Toronto, CANADA
- For consulting work availability, please send me a Private Message or submit a ✍️Contact Form.
- For FREE Shopify Tutorials, Subscribe to my YouTube channel (▶️ Ecommerce TV).
racelb
Visitor
1 0 0

I'm glad I found this thread! Can you please help me with the code if I want the blog paragraph text (not the heading) to be 22px and the color #282828?