Tagged: 

Viewing 10 posts - 1 through 10 (of 10 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

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