• hi,

    I love how clean and simple this theme is, but the site I’m building needs to be dark. Is there a way to force it to default to dark mode please? I could probably do it and hide the button with javascript trickery but I’m hoping there’s a better way.

    Thanks in advance ??

    P8

Viewing 1 replies (of 1 total)
  • Theme Author Atanas Yonkov

    (@nravota12)

    Hi @plus8web ,

    Thank you for using the Highstarter theme. Yes, you can only use the dark skin if you want. For this, you need to add the following php snippet to the site:

    function highstarter_dark_skin_body_class ($classes){
    	return array_merge( $classes, array( 'dark-mode' ) );
    }
    
    add_filter( 'body_class', 'highstarter_dark_skin_body_class');

    This code adds ‘dark-mode’ class to the document body. You can use the Code Snippets plugin to add this snippet to your site. Then, what is left to do is to remove the dark mode switcher in the footer. For this, you can go to theme customizer => night mode and remove the tick from “Enable dark mode”. Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Possible to force dark mode’ is closed to new replies.