All 41 Dark Mode answers

See every answer

Answer

Can I put the switch in my header?

Updated Dark Mode 1.8.0Tested with WordPress 7.1

Yes, three ways. In the block editor add the Dark mode switch block — search for "dark". Anywhere a block will not go, use [dark_mode_switch]: a widget, a template, Elementor's Shortcode widget, a theme file.

Then turn on Manual placement only on the Toggle Button screen, so the floating one in the corner goes away and yours is the only one.

A header usually wants a smaller switch than the corner does. The block's settings panel has its own Style, and the shortcode takes one too — [dark_mode_switch style="minimal"] draws just the mark. The wording, colours and size still come from the Toggle Button screen.

Still stuck? Ask the developers who wrote it. We aim to reply within one business day.

Dark Mode

Give your site a dark mode your readers can switch on — one that reads properly on every page, without you restyling anything.

From $19 a year · every feature · 30-day refund

Buy Dark ModeSee the plugin

A WooCommerce shop page in dark colours: near-black background, off-white site name, menu, headings and prices, and product pictures of hoodies and T-shirts unchanged. A white pill button in the bottom-right corner reads Light mode.