How to apply or have different image in a self made ads banner to a different blog post?

I have an article template that has floating ads on the side and sticky at the bottom which just points to our product page. The only way to change those banners is to create another article layout and just select it for the specific blog article so it won’t be the same as the others. Is there a way that I can easily change those images in the theme editor or even in the article editor and not in the code editor? I don’t know if we have metafields in the article because if it has this can be easily solved. I am thinking also of just providing a code in the article editor but I am thinking if there is another way that the author can easily change those ads image and its links without using codes or plugin.

Thanks

Metafields seems to be a great solution for the banner images storage. Especially now that Shopify has introduced the file reference metafields. You can configure the code to display the “dynamic” banners using the metafield content and the merchant would be able to manage the images easily:

And here’s the link to a step-by-step tutorial on how to display a metafield on the storefront. It works for both OS 2.0 and legacy themes. Yet another cool thing about the file reference metafields is that all the files are stored directly in the Shopify storage, which has to major benefits:

  1. you don’t have to use any third-party storage;

  2. Shopify would always generate a standard link, so you don’t have to worry about the format of the data entered by a merchant.

1 Like