Different Pages Same Images

Solved
greevesh
Excursionist
15 0 6

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.

 

dfdklfjdkfjel.PNGdkfjdkfdj.PNGsefjlefj.PNG

Accepted Solution (1)
Akibhusen
Shopify Partner
694 116 138

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' }}" />

Akibhusen Shekh | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Hire me, if you want to design, re-design, develop a store, or made changes to the pre-built store.

View solution in original post

Replies 6 (6)
Akibhusen
Shopify Partner
694 116 138

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.

Akibhusen Shekh | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Hire me, if you want to design, re-design, develop a store, or made changes to the pre-built store.
greevesh
Excursionist
15 0 6

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.

Akibhusen
Shopify Partner
694 116 138

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' }}" />

Akibhusen Shekh | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Hire me, if you want to design, re-design, develop a store, or made changes to the pre-built store.
Akibhusen
Shopify Partner
694 116 138

hi @greevesh ,

 

Hope this code is work well for you.

Akibhusen Shekh | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Hire me, if you want to design, re-design, develop a store, or made changes to the pre-built store.
greevesh
Excursionist
15 0 6

Thank you! 🙂

Akibhusen
Shopify Partner
694 116 138

Hi @greevesh ,

Can you please mark it as an accepted solution so everyone should know that you got the right answer.

Akibhusen Shekh | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Hire me, if you want to design, re-design, develop a store, or made changes to the pre-built store.