• Resolved graemeconradie

    (@graemeconradie)


    I’d like to display Night Mode as default, with the option for users to go to the light mode. How do I achieve this ?

    Regards

    Graeme

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author markoarula

    (@markoarula)

    Hi,

    unfortunately plugin still doesn’t have this option.

    Soon the plugin will be upgraded with more options and default night mode will be one of the new options.

    Best regards

    Thread Starter graemeconradie

    (@graemeconradie)

    Hey Marko,

    I’m not looking for a setting in the customizer to do this, adding the function you use in the click event will also do, just steer me in the right direction.

    Thanks for writing this BTW, work like a charm ??

    https://travelmy.city

    Graeme

    Plugin Author markoarula

    (@markoarula)

    Hi Graeme,

    you can make this changes in plugin and Night Mode will be set as default:

    1.) open plugins/wp-night-mode/admin/class-wp-night-mode-admin.php file, find this line of code: if ( 'true' == $wp_night_mode ) { and just replace true with false.

    2.) open plugins/wp-night-mode/public/class-wp-night-mode-public.php file, find this line of code: if ( 'false' === $wp_night_mode ) { and just replace true with false.

    3.) open plugins/wp-night-mode/public/js/wp-night-mode-public.js file, find all true values and change them to false and find all false values and change them to true

    this is it.

    Just be careful when the new version of plugin is released and when you update the plugin these changes will be overwritten.

    Regards

    Marko

    Thread Starter graemeconradie

    (@graemeconradie)

    You are a superstar ??

    Plugin Author markoarula

    (@markoarula)

    Thanks ??

    I’m glad I could help

    Thank you for those tips!

    • This reply was modified 5 years, 4 months ago by Jim.

    I followed all the steps without success. I made modest changes to the CSS and am very satisfied with the results. Switching works great but it isn’t persistent. Even going to a new page loads in regular mode. Any suggestions at your convenience would be appreciated. I can give you link. Thanks, Jim

    Plugin Author markoarula

    (@markoarula)

    Hi Jim,

    please send me a link, it would be very helpful.

    If you followed all steps everything should work properly. Have you tried to clear the cache?

    The site is SanDiego-autodetail.com. I can create credentials for you if I have a private way to send them. Thanks, Jim

    Plugin Author markoarula

    (@markoarula)

    I’ve just released a new version of the plugin and one of the new options is “Night Mode as Default”.

    You can find this option in Dashboard->Appearance->Customize->Night mode section and first option is “Night Mode as Default”. Just turn on this option and everything should work.

    Please let me know if this option will not work in some case.

    The update works like a charm! You can mark this resolved! Jim

    @markoarula for some reason default night mode doesn’t work on my site. I tried to delete cache and tested it with multiple other users in normal browsing modes as well as in private browsing modes.

    Plugin Author markoarula

    (@markoarula)

    @power506 I would like to check why default night mode doesn’t work. Can you create credentials for me and send them to [email protected]

    Hi @markoarula, fortunately, it worked a few hours after. Probably was a cache problem. Thanks for reply and thanks for this great plugin!

    Plugin Author markoarula

    (@markoarula)

    Glad to hear that everything works properly and that you like the plugin ??

    If you need anything else don’t hesitate to ask me.

    Best regards

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Night mode as default’ is closed to new replies.