Set up dark mode - Verba

Theme settings

Dark mode is part of the theme, in the free version, with no plugin needed. Your site carries two color schemes, light and dark, and the visitor chooses between them. The choice is remembered and survives moving to another page.

The same Verba header and posts ticker in the light scheme and in the dark scheme
One site, light and dark.

#Turn it on

Two places decide how visitors meet the dark scheme.

Default Color Scheme sits at AppearanceCustomizeVerba ThemeGeneralGlobal. It's what somebody sees on their first visit, before they've chosen anything: light, dark, or system. Out of the box it's set to dark, so change it if your site should open light.

The switcher and its behavior live at AppearanceCustomizeVerba ThemeGeneralDark Mode:

The Dark Mode tab with the switcher on, preference storage set to Cookie and the style set to Toggle
The Dark Mode tab in the Customizer.

Shows the control that lets visitors change the scheme. Turn it off and everyone gets the default scheme with nothing to toggle. The two settings below are hidden while it's off.

Where the visitor's choice is kept. A cookie travels with the request, so the correct scheme is chosen before the page paints. Local storage keeps it in the browser only.

A sliding toggle, or a single icon button.

System is the safer default for a public site. It follows whatever the visitor already set on their phone or laptop.

#Put the switcher where people can find it

Where the switcher appears is set separately in the header and in the footer, and separately again for wide and narrow screens. Out of the box it shows on desktop in both places and on phones in neither.

Set it in the header

Go to AppearanceCustomizeVerba ThemeNavigation. Color Scheme Toggle on Desktop is on the General tab, and Color Scheme Toggle on Mobile is on the Mobile tab.

Set it in the footer

Go to AppearanceCustomizeVerba ThemeFooter and use Scheme Toggle on Desktop and Scheme Toggle on Mobile on the General tab.

Check both widths

Resize the preview, or open the site on a phone. The desktop and mobile settings are independent, so having one on does not put the switcher on the other.

No switcher on your phone? Both mobile toggles are off by default, in the header and in the footer.

#The dark colors

Colors live at AppearanceCustomizeVerba ThemeTheme StylesColor Scheme, in the Dark Mode group at the bottom.

Every color exists as a pair: one light value, one dark value. That includes the accent. A monochrome brand often wants a dark accent on a light page and a light accent on a dark one, and a single accent color cannot do both.

Values in the dark group apply only while the dark scheme is active. A note above the group in the Customizer says the same.

Style kit presets set both schemes at once, so if you are starting from a kit the dark scheme is already coherent. See Colors, fonts, and style kits.

Set a separate logo for the dark scheme, or a dark logo will disappear against a dark background. Site-wide it is the Dark Scheme image at AppearanceCustomizeVerba ThemeGeneralBranding; the header has its own pair on the Branding tab under Navigation, and the footer on the Branding tab under Footer. See Logo and site identity.

If your logo is light to begin with, you do not need a second file.

#Your own content in dark mode

The theme repaints its own elements. It cannot guess the brightness of an image you uploaded or a color you typed into the content by hand.

For a section that carries its own dark background, see Building a section that stays dark, so the text on top flips with it. Check your article images too: a screenshot with a white background will still be white in dark mode, which is usually fine, but a logo saved as a transparent PNG in black will not be.

#Questions

Does dark mode change what search engines see?

No. Both schemes render the same HTML with different color values.

Cookie or local storage: which should I pick?

Cookie, unless you have a reason. The server can read it, so the right scheme is applied as the page loads rather than after. Local storage stays entirely in the browser, which some setups prefer for privacy reasons, but it can produce a brief flash of the wrong scheme.

Can I force the whole site to dark and remove the choice?

Set Default Color Scheme to dark and turn off Dark Mode Switcher. Visitors then get the dark site with nothing to toggle, and any choice stored on an earlier visit is ignored.

Why does my page flash white for a moment?

Usually a cache serving a page that was stored under the other scheme, or local storage being read after the first paint. Clear the cache, and switch Preference Storage to cookie.

Last updated

Was this article helpful?

FIND THE ONE THAT FITS YOUR PROJECT

Import a demo, swap the content, adjust the layout. Modern WordPress under the hood, fast even when the site fills up.