Comments on: How to Create a Sticky Header in WordPress (4 Methods) https://wpshout.com/wordpress-sticky-header/ A hub for advanced WordPress users, developers & savvy business owners. Thu, 08 Aug 2024 12:43:17 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Rob O'Rourke https://wpshout.com/wordpress-sticky-header/#comment-22743 Thu, 08 Aug 2024 12:43:17 +0000 https://wpshout.com/?p=131491#comment-22743 In reply to hslee.

I just had this same issue – it’s because the header template part has a wrapper and the group block with position sticky is inside it. It will only stick relative to any direct _siblings_, but because of the template part wrapper it doesn’t have any.

The solution is to add the following CSS to your theme somewhere:

.wp-block-template-part { display: contents; }

]]>
By: hslee https://wpshout.com/wordpress-sticky-header/#comment-22336 Mon, 22 Apr 2024 22:58:50 +0000 https://wpshout.com/?p=131491#comment-22336 Hi, I read your post very well.
I wanted to have a sticky header without plug-in or adding some codes. So I followed instructions in 2. Add a sticky header using the Full-Site Editor (FSE) but it does not work.

Header is being scrolled, it hasn’t changed sticky.

]]>