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.


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.












