WordPress
patterns/header-fse-1-dynamic.php
✔ Core
✔ Custom
- Use: sites with few menu items, ideally without submenus, and no search.
- Not when the menu needs submenus or a service menu.
- Source: the site logo; the menu entered by hand.
- Content: a logo in the site settings and one menu of up to five links, without submenus.
patterns/header-fse-2-dynamic.php
✔ Core
✔ Custom
- Use: projects with an extremely large mobile audience, built mobile first: the menu is hidden behind a button at every screen size; search is possible.
- Not when visitors need to see the sections at a glance on large screens.
- Source: the site logo; the menu entered by hand.
- Content: a logo in the site settings and one menu of up to six links.
patterns/header-fse-3-dynamic.php
✔ Core
✔ Custom
- Use: sites with few main menu items, ideally without submenus, plus a service menu, and no search.
- Not when search is needed or the main menu is long.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, three menus of up to eleven links in total and one button.
patterns/header-1-dynamic.php
✔ Custom
- Use: sites whose main navigation has priority and may grow long, with optional submenus, an optional service menu, search of medium importance and an optional call-to-action button.
- Not when search is the main way in, and not when it is unimportant.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu with submenus, a short service menu and one button.
patterns/header-2-dynamic.php
✔ Custom
- Use: sites whose main navigation has priority and may grow long, with optional submenus, an optional service menu and an optional call-to-action button, where search matters very little and opens only on demand.
- Not when search is a primary path into the site.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu with submenus, a short service menu and one button.
patterns/header-3-dynamic.php
✔ Custom
- Use: sites with few main menu items, optional submenus, an optional service menu, search of medium importance and an optional call-to-action button.
- Not for a long main menu.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu of few items with submenus, a short service menu and one button.
patterns/header-4-dynamic.php
✔ Custom
- Use: a lean header with few main menu items, a short service menu, search of very low priority and an optional call-to-action button.
- Not for long main or service menus.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu of few items, a short service menu and one button.
patterns/header-5-dynamic.php
✔ Custom
- Use: a lean header for sites whose main and service menus need a little more room, with search of low priority and an optional call-to-action button.
- Not for a long main menu with many submenus.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu with submenus, a short service menu and one button.
patterns/header-6-dynamic.php
✔ Custom
- Use: sites where search has very high priority and is the main way in, such as large catalogues or archives, with a main navigation that may grow long, optional submenus, an optional service menu and an optional call-to-action button.
- Not when search is secondary.
- Source: the site logo; menus and button entered by hand.
- Content: a logo in the site settings, a main menu with submenus, a short service menu and one button.
patterns/header-6-woo-dynamic.php
✔ Custom
- Use: WooCommerce shops that lead with search and need the cart reachable from every page.
- Not on sites without a shop.
- Source: the site logo and WooCommerce cart; menus and button entered by hand.
- Content: a logo in the site settings, a main menu with submenus, a short service menu and one button; the cart count comes with WooCommerce.
patterns/header-checkout-dynamic.php
✔ Custom
- Use: shops during cart and checkout, so visitors do not leave the order.
- Not as a site-wide header.
- Source: the site logo and the WooCommerce customer account.
- Content: a logo in the site settings; there is no menu, search or button.
Figma
Docs
Make sure that navigation menus have a correct accessible name via aria-label. In WordPress, this is derived from the name of the assigned navigation menu.
Customizing
The custom theme defines CSS variables that simplify the visual customization of the custom headers. Alternatively, they can be overridden in the Site Editor using custom CSS. Note that the variables are scoped to the header template part and must therefore be defined in .site-header rather than :root.
Each submenu also has an individual CSS class so that the respective menu can be targeted.
How it works
All header patterns are set up as <div> elements — this is correct, as they are included within a <header> element in the header template part.
Depending on the pattern, the navigation, search, or both are toggled via a toggle button.
Toggle buttons
Two buttons are dynamically rendered via JS:
| Selector | Icon | Opens |
|---|---|---|
.toggle-button-menu | #icon-menu (Hamburger) | #toggle-container-menu |
.toggle-button-search | #icon-search (Magnifier) | #toggle-container-search |
Toggle containers
The containers group all elements that are shown and hidden via a button. Each container has an ID for JS and a class for styling:
#toggle-container-menu/.toggle-container-menu#toggle-container-search/.toggle-container-search
Visibility is controlled via aria-hidden, which is set by JS. Submenus work on the same principle.
Breakpoint
The breakpoint for the custom headers is defined as an SCSS variable in globals/_header.scss and simultaneously exported as a CSS custom property. The JS reads --header-breakpoint at runtime and uses matchMedia(). The breakpoint only needs to be changed in one place in the SCSS code.
$header-breakpoint: 50rem; // SCSS for media queries
:root {
--header-breakpoint: #{$header-breakpoint};
}

Miscellaneous
- We recommend placing the language selector in the footer rather than in the header’s secondary navigation.
- Skip links are included as a separate pattern (
patterns/skiplinks.php) above the header pattern in the template part (header.php). WordPress’s built-in skip links are disabled via functions.php, as they can be extended more effectively in the custom pattern.
