Shopify themes, liquid, logos, and UX
I have followed the instructions on this page:
https://websensepro.com/blog/how-to-show-transparent-header-in-dawn-13-0-0/
for transparent header in theme dawn. It works good. But it also applies on other pages. I only want it to apply on homepage.
Thank you.
Hi @goblender 👋 Check if the template is the index (homepage aka main landing page) as a condition
{% if request.page_type == 'index' and section.settings.enable_transparent-header %}
https://shopify.dev/docs/api/liquid/objects/request
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @goblender, When you get to this step
You should add it as follows:
We need to create a new style tag and wrap it in a condition just for the home page
{% if template.name == 'index' %}
<style>
{% if section.settings.enable_transparent-header %}
.header-wrapper{
background: transparent !important;
position: absolute !important;
width: 100% !important;
top: 0px;
}
{% endif %}
{% if section.settings.color-transparent %}
@media only screen and (min-width: 600px) {
.list-menu__item, details[open]>.header__submenu {
color: {{ section.settings.color-transparent }} !important;
background: transparent;
}
}
.header__icon.link,.header__active-menu-item,.disclosure__button,.header__heading-link .h2{
color: {{ section.settings.color-transparent }} !important;
}
{% endif %}
</style>
{% endif %}
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Hello @goblender
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
{% if template == 'index' %}
<style>
.elementor-9746 .elementor-element.elementor-element-9071f05:not(.elementor-motion-effects-element-type-background){
background: transparent !important;
position: absolute !important;
width: 100% !important;
top: 44px;
}
</style>
{% endif %}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
This is Richard from PageFly - Shopify Page Builder App
Hi @goblender Please add code here to fix it:
Step 1: Online Stores > Themes > Edit code
Step 2: Choose file theme.liquid
Step 3: Add code above the tag </body>
{% if template.name == 'index' %}
<style>
#content{
margin-top: -100px;
}
</style>
{% endif %}
Hope my solution will help you resolve the issue.
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025