Dark Mode Block
Dark Mode Block is a simple yet powerful WordPress block plugin that allows you to enable dark mode for your website, enhancing readability and reducing eye strain without altering your websiteβs colors. Give your usersβ¦
Consider an alternative
Dark Mode Block shows warning signs in 2026 β compare the alternatives below before installing. Is rated 5/5 and was last updated 3 years ago, and scores 28/100 on our health check.
- Small user base (<10 active installs)
- Very few reviews so far
- No update in 2 years
- Only tested up to WordPress 6.4 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release β each site that auto-updates counts as a download.
Rankings
Where Dark Mode Block stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| block | >100 |
| css | >100 |
| dark mode | >100 |
| theme | >100 |
Rating breakdown
β β β β β β β β β β 5 from 4 reviews
About Dark Mode Block
From the official readme Β· v0.1.1Description
Dark Mode Block is a simple yet powerful WordPress block plugin that allows you to enable dark mode for your website, enhancing readability and reducing eye strain without altering your website’s colors. Give your users the flexibility to switch between light and dark modes seamlessly.
Designed to be lightweight and efficient the whole frontend script weights less than half of a kb gzipped π
Features:
– Toggle dark mode with a user-friendly icon.
– Preserve your website’s color scheme while improving readability in low-light environments.
– Enhanced user experience with reduced eye strain.
– Customizable
Make your website more accessible and user-friendly by offering a dark mode option. With Dark Mode Block, your users can enjoy your content without compromising on aesthetics.
Usage
- After activating the plugin, add the “Dark Mode” block to your WordPress page or post editor.
- Publish or update your content.
Customization
Unleash your creativity! This block is designed to be fully customizable graphically, and since it’s entirely CSS-based, it’s straightforward for anyone to modify and adapt it according to their own taste or template.
You even have control over how the dark mode is applied! Currently, I’ve applied an invert filter on the background as I don’t know the variables in your template.
However, you have the flexibility to make it even better by setting the text color as the background and vice versa.
Here’s how to do it:
- Add the following code to your functions.php file.
- Edit the $custom_css in order to fit your preferences
First dequeue the current style in this way:
add_action( 'wp_enqueue_scripts', function () {
/** dequeue the default dark mode */
wp_dequeue_style( 'codekraft-dark-mode-style' );
}, 9 );
Then add yours!
add_action( 'wp_head', function () {
/** @var {string} $custom_css - your custom css for the dark mode */
$custom_css = "html.dark-mode body {
--wp--preset--color--background: #232323;
--wp--preset--color--foreground: #f3f3f3;
}
.dark-mode-switch::before {
width: 1.6rem;
cursor: pointer;
display: flex;
font-size: 1.6rem;
line-height: 1.6rem;
content: 'π'
}
.dark-mode .dark-mode-switch::before {
content: 'π'
}";
echo "<style id='dark-mode-custom'>$custom_css</style>";
}, 20 );
Please support the plugin posting your custom style and a screenshot in the WordPress support forum section!
Installation
- Upload the ‘dark-mode-block’ folder to the ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own β no account needed.
Best Dark Mode Block alternatives
All block plugins βFAQ
Dark Mode Block: quick answers
Straight answers, pulled from live WordPress.org data.
Source: WordPress.org
Is Dark Mode Block free?
Yes. Dark Mode Block is free to download and use from the official WordPress.org plugin directory.
Is Dark Mode Block safe to use in 2026?
Dark Mode Block shows warning signs in 2026 β compare the alternatives below before installing. Is rated 5/5 and was last updated 3 years ago, and scores 28/100 on our health check.
How many websites use Dark Mode Block?
Dark Mode Block is active on <10 WordPress websites and has been downloaded 3,599 times since it launched in January 2024. It was downloaded 139 times in the last 30 days.
Does Dark Mode Block work with WordPress 7.1?
Dark Mode Block is officially tested up to WordPress 6.4.15, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does Dark Mode Block need?
Dark Mode Block requires PHP 5.6 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Dark Mode Block last updated?
The latest version, 0.1.1, was released on March 6, 2024 (3 years ago).
Who makes Dark Mode Block?
Dark Mode Block is developed and maintained by Erik.
What are the best alternatives to Dark Mode Block?
The most popular alternatives to Dark Mode Block are Spectra Legacy (1M+ installs), Breadcrumb NavXT (700K+ installs) and PDF Embedder (300K+ installs).
Powered by PageForge
One template and a spreadsheet. A real page for every search.
PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.
- CSV and XLSX, plus Google Sheets on Professional and Enterprise
- Its own title, URL, SEO fields and schema for every page
- Works with the block editor, Elementor, Divi and Avada
- Free on WordPress.org, no credit card
