The sticky header is not working on the product page

Solved

The sticky header is not working on the product page

Eric_Gift
Tourist
9 0 3

Hello,

I’m currently using the Shopify Honey theme and have enabled the sticky header feature.

However, it seems that the sticky header is not displaying on the product page.

Could anyone provide guidance on how to ensure that the sticky header appears consistently across all pages? Your help would be greatly appreciated.

My store: https://cloudgifts.com.tw/
Product page: https://cloudgifts.com.tw/collections/all/products/silicone-lunch-box

Accepted Solution (1)
BSSCommerce-HDL
Shopify Partner
2305 835 907

This is an accepted solution.

Pls try again with this code: 

<style>
sticky-header.header-wrapper.header-wrapper--uppercase {
    background-color: #ca9f93;
    color: #ffffff;
    position: fixed;
    top: 83px;
    left: 0;
    width: 100vw;
    transition: 0.2s;
}

.header-wrapper:before {
    background-color: transparent !important;
}

.shopify-section.shopify-section-group-header-group.shopify-section-header.scrolled-past-header sticky-header.header-wrapper {
    top: 0 !important;
}

.shopify-section.shopify-section-group-header-group.shopify-section-header.scrolled-past-header.shopify-section-header-hidden {
   transform: unset !important;
}
</style>

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

View solution in original post

Replies 5 (5)

BSSCommerce-HDL
Shopify Partner
2305 835 907

Hi @Eric_Gift

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

 

<style>
sticky-header.header-wrapper.header-wrapper--uppercase {
    background-color: #ca9f93;
    color: #ffffff;
    position: fixed !important;
    top: 83px;
    left: 0;
    width: 100vw;
    transition: 0.2s;
}

.header-wrapper:before {
    background-color: transparent !important;
}

.shopify-section.shopify-section-group-header-group.shopify-section-header.scrolled-past-header sticky-header.header-wrapper {
    top: 0 !important;
}
</style>

 

Here is result: 

BSSCommerceHDL_0-1724292303955.png

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

Eric_Gift
Tourist
9 0 3

After adding this code, the header becomes a fixed sticky header, but on the product page, it turns into a scrolling sticky header.😢

BSSCommerce-HDL
Shopify Partner
2305 835 907

This is an accepted solution.

Pls try again with this code: 

<style>
sticky-header.header-wrapper.header-wrapper--uppercase {
    background-color: #ca9f93;
    color: #ffffff;
    position: fixed;
    top: 83px;
    left: 0;
    width: 100vw;
    transition: 0.2s;
}

.header-wrapper:before {
    background-color: transparent !important;
}

.shopify-section.shopify-section-group-header-group.shopify-section-header.scrolled-past-header sticky-header.header-wrapper {
    top: 0 !important;
}

.shopify-section.shopify-section-group-header-group.shopify-section-header.scrolled-past-header.shopify-section-header-hidden {
   transform: unset !important;
}
</style>

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

Eric_Gift
Tourist
9 0 3

Thank you very much!

BSSCommerce-HDL
Shopify Partner
2305 835 907

@Eric_Gift, No problem. Have a good day 😍

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