Willow Scroll

Willow Scroll

A sticky and transparent header with rules per template, category and single page. Plus a scroll-to-top button, a reading progress bar and a custom scrollbar.

The problem. A sticky header is needed on almost every site, and almost always with different conditions: transparent over a full-width banner on the front page, dark on products, regular on the blog. Most themes give one option for the whole site, or nothing at all, and from there it turns into CSS for every separate case.

What it does. The header is set up once, and exceptions are added on top: a rule per template following the WordPress template hierarchy (post type, archive, taxonomy, front page, search, 404, custom theme templates), a rule per category or tag that can also cover the posts inside it, and a setting for one specific page right in the editor. The order of priority is simple: the page, then the rule, then the site settings. Every field shows the value it inherits and where it comes from.

For the header itself: regular or transparent, sticky with a choice of scroll behaviour, background and gradient from the theme palette, blur, shadow, a floating look with its own spacing and rounded corners, shrinking on scroll, and a separate logo for each state.

It works in block themes and classic themes alike: block themes use the header template part, classic themes have the header detected on the site once and remembered, and if the automatic result is wrong, the selector can be entered by hand.

Extras. Each module works on its own: a reading progress bar, a scroll-to-top button with its own look, and a custom scrollbar that stays the system one on small screens.

Technically. No external services, no libraries. The styles are printed inline, the script is a single small file, scrolling is handled in one animation frame, and the header moves with transforms, so the page is not laid out again. A hidden header comes back when a visitor reaches it with the keyboard, and motion is turned off for those who ask for less of it.

Requires WordPress 6.6 or later.