Adding class to html element doest not open customiser

[ad_1]

So I created a custom dark and light theme functionality in your theme and it is working fine in local version but when I move this site live and try to open customiser to edit css i get this error
The theme directory "dark"(or "light" in some cases) does not exist.

Which makes me think maybe added classes to your theme html element is causing some issues…

I tried changing class names from dark-theme to mode-dark e.t.c
I also tried this code but nothing changed

// Handle customizer loading function fix_customizer_theme_redirect() {
if (is_customize_preview()) {
add_filter('stylesheet', function() { return 'kadence'; });
add_filter('template', function() { return 'kadence'; }); }
}
add_action('init', 'fix_customizer_theme_redirect');

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer