Different background images for different pages in Prestige theme.

Hello,

I have a main section of my store, TrinityThrift.com, and two subsections, AstrologyDrip & BackDrip. For these collection pages, I would like to have a different background than the main (home) page – specifically, a galaxy background for the AstrologyDrip collection pages.

I found that another question posed here offered a solution; however, when I paste the code below into my Prestige theme, one of two things happens:

  1. It changes the home page’s background, but not the background of the collection page where I’m putting in the code with the file name.

  2. I leave the original text, and just insert the code underneath; that puts the background on the right page, but UNDERNEATH the original look of the page (basically giving me my collection with the regular background, but then repeating that collection again after the footer, WITH the background).

In the “theme.scss.liquid” section, I’m changing this:

{% section ‘header’ %}

{{ content_for_layout }}

{% section ‘footer’ %}

to this:

{% section ‘header’ %}

{{ content_for_layout }}

{% section ‘footer’ %}

I’ve tried removing the "div class=“page-container page-element is-moved-by-drawer” text, but that removes everything all together.

Is there something I’m missing? I’m at a complete loss, and any suggestions would be VERY helpful at this point.

Thank you!

1 Like

@TrinityThrift - I believe you have 3q pages index, astro and back, and you want 3q separate background images for 3 of them?

if we can put unique ids for the pages using liquid code, then it is possible, are you familiar with liquid coding?

Only vaguely. I’ve placed code before, but do not necessarily know how to write it myself.

@TrinityThrift - if you can accept me as collab, then I can add unique ids to the pages, using w\hic\h you can set the background

Ok. You can send the request. For now, I’d like to just upload the image for the AstrologyDrip background page. It is named BACKGROUND-261243666571

@TrinityThrift - i sent request

Accepted!

@TrinityThrift - checking now

@TrinityThrift - i can not access images, can you share the image link?

Is this what you need?

https://cdn.shopify.com/s/files/1/0325/0605/2747/files/Background-261243666571.jpg?v=1662510772

@TrinityThrift - please check - https://trinitythrift.com/collections/backdrip

you will need few more css settings to make everything look good, but for now you can set different images for different pages using unique id, which you can find at the very end of theme.scss.liquid file

I see it! That’s great!

So, for Astrology, would I just add the code below underneath the first one?

#astrologydrip{background-image:url(“https://cdn.shopify.com/s/files/1/0325/0605/2747/files/Background-261243666571.jpg?v=1662510772”);}

@TrinityThrift - yes

Wow, amazing; thank you so much!! I’ve been struggling with that for weeks, didn’t realize it was that simple, lol. :slightly_smiling_face:

@TrinityThrift - welcome, please like accept any post as the solution.

1 Like

Done! Thanks again! :slightly_smiling_face: