Shopify themes, liquid, logos, and UX
https://t6jgi1v6yzzr8wsj-57335021729.shopifypreview.com
Password - rubrao
I have three articles.
I've included a section that allows me to add a featured image for the articles.
I want each article to have its own unique featured image.
If you select one featured image on one article, then that image becomes the featured image for every article.
I want to have the ability to select a unique image for every article from the 'Featured Image' section.
What code can I use to enable this?
You'll see that all three articles have to have the same image via the 'Featured Image' section.
I don't want this. I want each article to have its own image.
Solved! Go to the solution
This is an accepted solution.
HI @greevesh ,
Put the below code in your 'article-template.liquid' file.
keep the code where you want the image like before/after the blog title.
<img src="{{ article.image.src | img_url: '500x' }}" />
Hi @greevesh ,
On each article page, there is only one section is called. So, whenever you open the article page it's called that common section.
You can either fetch the feature image which are set to the blog post or if you don't want to fetch feature image then you can used metafeld app to call unique image for each artical.
Hi there.
Thanks for the reply.
I'd like to use the first solution you suggested.
I want to fetch the feature image that is set on each blog post so that each page has its own image.
Do you know a Liquid solution for this?
I'd rather not install any apps if I don't have to.
This is an accepted solution.
HI @greevesh ,
Put the below code in your 'article-template.liquid' file.
keep the code where you want the image like before/after the blog title.
<img src="{{ article.image.src | img_url: '500x' }}" />
Thank you! 🙂
Hi @greevesh ,
Can you please mark it as an accepted solution so everyone should know that you got the right answer.
User | RANK |
---|---|
157 | |
137 | |
74 | |
70 | |
62 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023