Tagged: 

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #1418779

    Hi “Enfold”,

    recently a customer asked me if he could have the Dark/Light Mode switch on his site.

    Could you tell me if I can hope that one of the next versions of Enfold will include the Dark/Light Mode switch?

    While waiting for Enfold to add the native Dark/Light Mode switch, could you tell me if you know of a “Dark/Light Mode” plugin compatible with Enfold?

    Best regards,
    Oriano

    #1418839

    Hey Oriano,

    Thank you for the inquiry.

    We haven’t tried any of the dark mode script before but we have found a few options in the plugin library.

    // https://wordpress.org/plugins/search/dark+mode/

    There are also dark mode extensions for your browser.

    // https://beebom.com/best-dark-mode-extensions-google-chrome/
    // https://techwiser.com/dark-mode-reader-firefox-add-ons/

    This extension seems to be one of the more popular choices.

    // https://nighteye.app/

    Best regards,
    Ismael

    #1418851

    Hi Ismail,
    thank you for the advice.

    Honestly, I would prefer to have the DarkMode Switch integrated into the theme. And since I use Enfold as my favorite theme for the sites I create and manage… well… you can imagine ☺️

    So please,
    consider this option, and if possible, keep us informed about your development decisions, so that we, professional users of your theme, can know whether or not to offer this option to our customers.

    Best regards,
    Oriano

    #1418852

    Hi Oriano,

    We will forward your request to our channel and open a dedicated thread for it for further considerations.

    Thank you for using the theme, and we’ll let you know if there are updates regarding the integration of the darkmode option. We appreciate your support.

    Best regards,
    Ismael

    #1418853

    Hi Ismael, thanks for the reply.

    PS: I made this request to you, because a client asked me to have this option on the site I proposed to him (naturally based on Enfold), and before installing a specific plugin (and I prefer to use Enfold precisely because it allows me to create sites almost without having to use additional plugins…), I wanted to hear your opinion :)

    Best regards,
    Oriano

    #1418880

    i tested ( not all on Enfold ) a lot of those dark-mode solutions.

    They all suffer from the fact that switching to dark mode often does not produce a satisfactory result. So maybe another approach I had in mind is to use this snippet to set a custom colour scheme.

    function custom_color_set($color_sets){
      $color_sets['dark_mode'] = 'Dark Mode';
      return $color_sets;
    }
    add_filter( 'avf_color_sets', 'custom_color_set', 999, 1 );

    but on that case the class (dark_mode) will not go to the alb element – but to the body class list. Maybe we can add for that new color-set some input-fields for menu-colors and header area colors.

    Then all we would have to do is add a button (e.g. in header_meta) to switch the page to that colour scheme.
    Of course, it would be a lot of work to set this up, but it could be worth it for a better customised look.

    #1418889

    Hi Guenni007
    humm… interesting, even if not easy to implement.

    Maybe it could be a good solution, at least on small sites, with a limited amount of content.

    Do you have a online demo site on which you have implemented this solution?
    And how to have a button (switch skin) with icons night/sun?

    Best regards,
    Oriano

    #1418893

    Or, to cut a long story short, manually setting up a colour scheme that is responsible for the dark mode would be more time-consuming, but would probably produce better results.

    #1418902

    Try to install that little plugin: https://wordpress.org/plugins/dark-mode-toggle/
    Even in the free version there is an option to exclude Elements from dark-mode via class (dmt-filter-1)
    so if you insert on child-theme functions.php:

    function exclude_from_darkmode(){
    ?>
    <script>
    window.addEventListener("DOMContentLoaded", function () { 
    (function($) {     
      $('.logo, #footer, #socket').addClass('dmt-filter-1'); 
    })(jQuery);
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'exclude_from_darkmode');

    these elements and all child elements were excluded. The same if you insert to alb element that custom class!

    by the way : you can exclude a whole color-section but include again a child by adding the same class to it :lol : -1 x -1 = 1
    I don’t know why images on sliders (see example page) are excluded from the outset.

    #1418910

    Hi Guenni007,
    thanks for the help and suggestions.
    I will also do some tests, following your instructions.

    Best regards,
    Oriano

    #1489484

    Hi Guenni007,
    i tried the https://wordpress.org/plugins/dark-mode-toggle/ on my website and it works really good.
    Is there a solution to automatic switch between light and dark depending on time of the day?

    #1489485

    Oh, i found that in the pro version of the plugin it is already implemented :-)

    #1489486

    Hi @dondela, so far, I’ve only tested dark-mode-toggle/ on local test sites. I haven’t used it on production sites yet because I’m afraid of unexpected malfunctions :(
    If you’re using it on a production site (with Enfold), could you please give me the link so I can take a look?

    Best regards,
    Oriano

    #1489487

    @Dondela, could you please give me the url of the site where you are using Dark Mode Toggle plugin?

    Best regards,
    Oriano

    #1489488
    This reply has been marked as private.
    #1489492

    :(
    Hi @dondela,
    Perhaps you wrote the website URL in ‘Private content’, but that is a space that only support moderators can see… and I am just a user like you, and I cannot see what you write in Private Content (which is only right, after all).

    Well, if you can, please write me the URL of the website where you are using the Dark Mode Toggle plugin to my email (Email address hidden if logged out)

    Thank you.
    Oriano

    #1489508

    Hi,
    Thanks for shairing your site @dondela, it looks good, did you use Guenni007’s snippet, or is this the plugin out-of-the-box?

    Best regards,
    Mike

    #1489519

    HI Mike,
    i used the plugin out-of-the-box.

    Regards

    #1489543

    Hi,
    Thanks, it seems to work well :)

    Best regards,
    Mike

Viewing 19 posts - 1 through 19 (of 19 total)
  • You must be logged in to reply to this topic.