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.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024