I would like to know as well
have you tried this
add_action( 'wp_footer', 'rew_supports_js' );
function rew_supports_js() {
echo '<script>document.body.classList.remove("no-js");</script>';
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Thanks @robin w, for the advise but alas, it did not work for me
is your site public enough to be able to see an example?
Wow, it works like a charm for me!
Thank you very much Robin for a very helpful work. 🙂 Great!
Robin-w the site is offline. I actually use it for notes on my clients dealings. It did not work for me and I even tried the plugin as well. Seen as it worked for neon67 I can only assume its a plugin that is causing me the problem. I changed the theme to the default WP theme and it did not work. I will deactivate the plugins over the weekend and try the code again and hopefully it will work.
ok, let us know how you get on
you can use the troubleshooting part of this plugin to let you see what happens when you deactivate without needing to affect the live site
Health Check & Troubleshooting