Hi, does anyone knows how to insert an image banner into my product page where each image display a different banner for each collection where it also supports both mobile and desktop.
IF anyone knows how to do it do reach out to me.
Thank You.
Hi, does anyone knows how to insert an image banner into my product page where each image display a different banner for each collection where it also supports both mobile and desktop.
IF anyone knows how to do it do reach out to me.
Thank You.
@Bugbuzz456 you will need page builder app to build product pages, default shopify pages will not provide different images for different pages
Hi can it be done with using any coding or you have a app recommendation to try out
Hi @Bugbuzz456 , thanks for reaching out.
Could you let me know which theme you are currently using to add the image banner? For example, if you’re using the Dawn theme, here are the steps to address the issue:
I hope my solution is helpful to you, and please feel free to feedback.
Liz
Hello @Bugbuzz456
You will need to modify your product.liquid or main-product.liquid file (depending on your theme) to display the appropriate banner based on the product’s collection.
Insert Banner Code: Add the following code at the top of the product page template, where you want the banner to appear:
{% assign current_collection = product.collections | first %}
{% if current_collection %}
To handle both desktop and mobile, update your theme’s CSS file (theme.css or styles.css):
.collection-banner {
background-size: cover; /* Ensures the image covers the entire div /
background-position: center; / Centers the image /
background-repeat: no-repeat;
width: 100%; / Ensures it spans the full width /
height: 300px; / Default height for mobile */
}
@media (min-width: 768px) {
.collection-banner {
height: 500px; /* Taller height for desktop */
}
}
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
@Bugbuzz456 - you can try meta tags coding if you are familiar with it, otherwise needs to use page builder app
Hi @Bugbuzz456 , thanks for your feedback.
If you’re using the Crave Theme, here are the steps to address the issue:
Please let me know if you have any questions.
Liz
Hi @Bugbuzz456
You can consider creating different collection templates in your theme for each collection:
1/ You can create a template here: https://prnt.sc/AddM0WMLjgsZ
2/ And add this image banner block here: https://prnt.sc/nAMmGJS2rcyw
3/ Go to one collection and assign it to the collection template you have just created here: https://prnt.sc/m8DUFH-gfd_D
Please let me know if it works. Thank you!
Best,
Daisy - Avada Support Team.