Custom png background in specific page dawn theme

Topic summary

A user is attempting to add a custom PNG background image to their About Us page in the Dawn theme but encountering issues with their code implementation.

Problem:

  • Code placed in theme.liquid’s <head> section isn’t working
  • Uses conditional logic to target pages containing ‘about’ in the URL
  • Applies CSS for background image with no-repeat and cover properties

Solution Provided:
Another user offered an updated code snippet that:

  • Maintains the same conditional targeting ({% if request.path contains 'about' %})
  • Includes CSS styling for the background image
  • Uses Shopify’s Liquid syntax to reference the asset file

The discussion appears to be ongoing, awaiting confirmation on whether the suggested code resolves the issue.

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

Hi, I am trying to change the background on my about us page, but the code is not working. I added this code in theme.liquid, of course the code is in .

{% if request.path contains 'about' %}
<style>
body {
background-image: url({{ 'magazyn1.png' | asset_img_url: 'original' }});
background-repeat: no-repeat;
background-size: cover;
}
</style>
{% endif %}

https://5a8ab2.myshopify.com/pages/about

123

Hi @ErnestoF

Try the below updated code:

% if request.path contains 'about' %}

{% endif %}

I hope this will work.

Best regards,