Header Positions and overlapping content

Estimated reading time: 5 min

The header sits at the top of every page, and there are only two things you normally want to decide about it. Does it scroll away with the page or stay pinned to the top? And should the content underneath start below the header, or slide under it so a hero image fills the whole screen? The simplified header settings ask you exactly those two questions, the first once for the whole site, the second on each page that needs it.

Availability

The simplified header settings ship in Rey 3.4.0. New installations use them from the start. On a site that already existed, the classic settings stay in place until you switch, so nothing changes under you. See Switching from the classic settings below.

You can tell which model your site uses by opening the Position dropdown. Two choices, Standard and Sticky, means you are on the simplified settings. Three choices, with Overlay as the third, means you are still on the classic ones, documented in Header Positions and Overlapping Content (classic settings).

Where to find it

The site-wide position lives in Rey › Settings › Header › General, under the Header Position heading.

The Header › General section with the Header Position heading and the Position dropdown open, showing Standard and Sticky.

The per-page overlap lives in each page’s own settings. Edit the page, find the Page Settings box, and open its Header tab.

The Page Settings box on a page edit screen, Header tab active, showing the Header Overlap Content field set to No.

Position

This is the site-wide choice, and it applies to every page. It is hidden when Header Layout is set to No header, since there is nothing to position.

Standard

The header sits at the top of the page and scrolls away as the reader scrolls down. This is the default.

Standard header position.

Sticky

The header stays pinned to the top of the screen while the reader scrolls, so the menu and cart are always in reach. Choosing Sticky reveals one extra option below.

Sticky header position

Turn off sticky on mobile

Shown only when Position is Sticky, and on by default. A pinned header eats into a small screen, so on phones the header scrolls away like a standard one. Turn it off if you want the header pinned on mobile too.

Header Overlap Content

This is the per-page setting, in Page Settings › Header. It has three fields, one for each screen size: Header Overlap Content, Header Overlap Content (tablet) and Header Overlap Content (mobile). Each is a plain Yes or No, and all three default to No.

Set it to Yes and the page content starts at the very top of the screen, sliding underneath the header instead of beginning below it. That is what lets a hero image or a page cover fill the screen from edge to edge with the logo and menu floating on top of it.

The three fields are independent. Turning it on for desktop does not turn it on for tablet or mobile, which is usually what you want, since a hero that looks generous on a wide screen often leaves the menu unreadable on a phone.

The setting works on both positions, and the result differs slightly:

  • On a Sticky header, the content starts at the top and slides under the pinned header as you scroll.
  • On a Standard header, the header floats over the content and scrolls away with it. This is what the classic Overlay position used to do.

What happened to the Overlay position

Nothing was lost, it just stopped being a separate position. Overlay was always “standard header, but let the content slide under it”, which is now Position Standard plus Header Overlap Content Yes. One less choice to make site-wide, and you set it only on the pages that actually need it.

Two pages with their own overlap setting

The search results page and the full-screen product page are not regular pages, so they have no Page Settings box. Their overlap lives in the theme settings instead.

Search results

Rey › Settings › General › Search Page has a Header Overlap Content toggle, off by default. It does the same thing as the per-page field, for the search results page.

Full-screen product pages

Rey › Settings › Product Page › Layout has a Header Overlap Content toggle, shown when the product page uses the Full-screen skin, and on by default. Overlapping is part of that skin’s design, so it applies on desktop while tablet and mobile start below the header.

Switching from the classic settings

The switch lives in Rey › Settings › Advanced › Features, on the card called Simplified header settings. Set Status to Active, confirm, and the site converts.

The Advanced › Features page showing the Simplified header settings card with its state chip and the Status dropdown open on Default, Active, Inactive.

Your current values are backed up first, and setting Status back to Default or Inactive restores them, so the switch is reversible.

Two things do change, and it is worth knowing before you click:

  1. Pages that explicitly chose the Overlay position keep their look. The conversion writes Yes into their Header Overlap Content fields, so they carry on overlapping.
  2. Pages that only overlapped because of the site-wide toggle will start below the header. The classic model had a site-wide Overlap Content switch that was on by default for sticky headers, which meant content slid under the header everywhere without anyone choosing it. That site-wide switch is retired. If you liked that look on a page, open the page and set Header Overlap Content to Yes.

Per-page position overrides are also removed, since position is now a single site-wide choice. A page that was individually pinned to Sticky on an otherwise standard site will follow the site-wide position after the switch.

Three things worth knowing

Overlap needs a page built for it. The content slides under the header, so whatever sits at the top of the page gets partly covered. It looks right when the page opens with a full-width hero, a page cover or a large image. Turn it on above a normal heading and the heading hides behind the logo.

A solid header background defeats the effect. If the header has an opaque background color, the content passes behind a solid bar and you see nothing of it. For the built-in header, set Background Color in Rey › Settings › Header › General to transparent, or to a color with reduced opacity. For a header built as an Elementor global section, set the background inside that section instead.

Sticky and overlap answer different questions. Sticky decides whether the header stays on screen. Overlap decides where the content starts. A sticky header stays pinned whether or not the page overlaps, and a standard header scrolls away whether or not the page overlaps.

Example: a homepage with a full-screen hero

The goal is a homepage that opens with a full-screen image, the logo and menu floating over it, while every other page keeps a normal header.

  1. Go to Rey › Settings › Header › General and set Position to Standard. Save.
  2. Still in that section, set Background Color to transparent, so the hero shows through. If your header is an Elementor global section, set its background there instead.
  3. Edit the homepage. In the Page Settings box, open the Header tab.
  4. Set Header Overlap Content to Yes. Leave the tablet and mobile fields on No for now.
  5. Set Header Text Color to white in the same tab, so the menu stays readable over the image.
  6. Update the page and view it. The hero should start at the very top with the header floating on it.
  7. Check the page on a phone. If the hero works there too, come back and set Header Overlap Content (mobile) to Yes.

Every other page is untouched, since the overlap field defaults to No.

For developers

The three overlap values are passed through a filter before the header renders, so you can force overlap on templates that have no page settings of their own, such as archives:

add_filter( 'reycore/header_helper/overlap_classes', function( $values ) {
	if ( is_shop() ) {
		$values['desktop'] = '--dnone-lg';
	}
	return $values;
} );

The array has the keys desktop, tablet and mobile. An empty value means no overlap, and the class names that turn it on are --dnone-lg, --dnone-md and --dnone-sm respectively.

Add this to your child theme’s functions.php, or to a code snippets plugin. Never edit the parent theme, as your changes are lost on the next update.

Show comments and replies (closed)Hide comments and replies

Left here in 2021, when comments were open. The answers were written then and may describe a version of Rey that has changed since.

  1. Jakub

    Hello, the overlapping header doesn't work with the header in mobile? I have been trying everything I could (it works problely on tbalet and computer)

  2. Jakub

    With forced overlapping but without "sticky"

  3. MariusRey

    Hey Jakub,

    Try this please, in Customizer > Header > General, make sure to have the Overlap options disabled eg: [link no longer available] . Afterwards, access Homepage in the backend and make sure to enable Overlapping eg: [link no longer available] . Basically overlapping should be disabled sitewide so that the header doesn't stay over the content, however onto the homepage, it should be treated as an exception because it needs the header to stay over the image. Hope it makes sense!

Was this article helpful?