Connect with us

Wordpress Tips

How to Add an Instant Dark Mode to WordPress

Those of you who have visited Wiki and other popular sites have probably noticed that many of them have a button that lets you activate a dark mode. You can always install a plugin to do it or write a function that adds such a feature to your website. We are using invert(1) hue-rotate(180deg) that inverts the color of your UI but keeps your photos looking normal.

🛠️ Divi Builder drag & drop page builder for WP

This particular function is made for your admin panel, so regular visitors won’t see it. Just add the above function to your child theme’s functions.php, and you are set.

Continue Reading
You may want to check out:
*some of our articles and lists include affiliate links to fund our operations (e.g. Amazon, Elegant Themes, Envato). Please read our disclaimer on how we fund Exxponent.
You may also like...
Click to comment

More in Wordpress Tips

To Top