Image to show on one collection page only

Topic summary

A user needed to display a specific image (desktop and mobile versions) exclusively on their Black Friday Sale collection page, as it was currently appearing across all collection pages.

Solutions Proposed:

  • Template-based approach: Create a dedicated collection template named “Black Friday Sale” through the theme customizer, assign it to the specific collection, and add the image directly within that template. This ensures the image only appears on the designated page.

  • Code-based solution: Add custom CSS/JavaScript code to the theme.liquid file before the closing </body> tag. The code uses conditional logic to check if the current collection handle matches “black-friday-sale” and displays the image only when true.

Outcome:

The issue was successfully resolved using one of the code-based solutions provided. The user confirmed it worked perfectly.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

I have an image (desktop and mobile), which I only want to show on this page

https://theothelabel.com/collections/black-friday-sale

It is currently showing on all collection pages. How can I code this so it only shows on this one page?

Thanks

Hello @JoeyRoo

  1. Go to Theme Customization:

    • Navigate to Online Store > Themes.
    • Click Customize to enter the theme editor.
  2. Create a New Collection Template:

    • In the theme editor, go to Collection Pages.
    • Click on Collection Page to edit.
    • In the left panel, click on Template (usually located at the top).
    • Create a new collection template, and name it Black Friday Sale.
  3. Assign the New Template to the Black Friday Collection:

    • Go to Products > Collections.
    • Find and select the Black Friday Sale collection.
    • In the collection details, locate the Template section.
    • Set the template to Black Friday Sale (the one you just created).
  4. Add Your Image to the New Template:

    • Now that you’ve assigned the template, you can add the image (for desktop and mobile) directly within the Black Friday Sale template section.
    • This will ensure the image only appears on the Black Friday Sale collection page and not on any other collection pages.

Hi,JoeyRoo

Custom coding is required for this page to tailor your collection’s specifications. If you’re willing, could you please share your URL and grant collaborator permissions, or feel free to DM

@JoeyRoo - please add following code in your theme.liquid file before

{% if collection.handle=="black-friday-sale" %}

{% elsif %}

{% endif %}

You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code before the tag


Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

This worked perfectly. Thanks :slightly_smiling_face:

Glad to hear that Joey :slightly_smiling_face: