Cannot set property ‘className’ of null at setThemeFromCookie

Using JQuery Simplifies the whole thing, using JS Cookie $(document).ready(function(){ // Check cookie and set theme if(Cookies.get(‘theme’)) { $(‘body’).removeClass(‘light-mode dark-mode’).addClass( Cookies.get(‘theme’) ); }; //Switch theme and create the cookie… $(“#theme-toggler”).click(function(){ if ($(‘body’).hasClass( ‘light-mode’)){ $(‘body’).removeClass(‘light-mode’).addClass(‘dark-mode’); Cookies.set(‘theme’, ‘dark-mode’); }else { $(‘body’).removeClass(‘dark-mode’).addClass(‘light-mode’); Cookies.set(‘theme’, ‘light-mode’); } }); }); Add id to button. <button id=”theme-toggler” type=”button” name=”dark_light” title=”Toggle dark/light mode”>🌛</button> … Read more

“… logged-in …” seems top of my website

It’s Used to All class add to wordpress body element Using body_class(); function. Specifically, it’s used to adding body classes, removing body classes, conditionally adding body classes and some use cases. The Body Class: What Can It Be Used For? The body class in WordPress is a class or series of classes that are applied … Read more

debugging errors.. how to remedy?

Replace get_bloginfo( ‘siteurl’ ) with home_url(). As the get_bloginfo() Codex entry explains, siteurl is deprecated: ‘siteurl”https://wordpress.stackexchange.com/”home (note this is deprecated! from version 2.2)”https://wordpress.stackexchange.com/”url’ – Returns the ‘Site address (URL)’ set in Settings > General. This data is retrieved from the ‘home’ record in the wp_options table. Consider using home_url() instead.

register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead

From your title: register_sidebar_widget() is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. Somewhere in your Theme – in functions.php, or in a function included within functions.php – you’re adding custom Widgets. Look for that code, and replace usage of register_sidebar_widget() with wp_register_sidebar_widget(). PROTIP: Use the Log Deprecated Notices Plugin to track down where the deprecated … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)