Coming from Cwicly Community Facebook group. I noticed this when I tried to make a sticky header. Fixing the header on the top is now my sticky solution and it works well, but the catch is the header covers the WP admin bar on the frontend so I can’t access it anymore.
I was trying to figure it out myself but still can’t get my head around it. Found the thread below but it was started 10 years ago. Things have changed a lot in WP core so there seems not a generally accepted way to do it.
Experts like @Marius could you please share some tips for doing this so beginners like me can learn?
The solution here is actually pretty simple.
The idea behind it is to show your fixed header on the very top (or wherever you want it to stick) and in case the admin bar is displayed, an offset of the admin bars’ height is applied to the header.
The easiest solution is to go with the Cwicly settings’ custom code option because everything you enter here will only get applied on front-end.
Thank you so much @Marius ! It works like a charm. You’re a legend.
I noticed that this can’t be used together with the Scroll Down → Slide Up setting described here: Show & Hide Header on Scroll - Wordpress Gutenberg - YouTube since the slid-up header just stops at a position that partially covers the admin bar.
Just to be clear - if I make a second header to be displayed in a different context – I would then have to give that header the same class or modify it somehow ?