Hi Tom,
I use validator for HTML
https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.refu.ro%2F
And the validator give me a warning:
The type attribute is unnecessary for JavaScript resources.
Where <script type=”text/javascript”> is the problem for the not fully validate the blog.
This code in child functions.php help?
add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts' );
add_filter('style_loader_tag', 'myplugin_remove_type_attr', 10, 2);
add_filter('script_loader_tag', 'myplugin_remove_type_attr', 10, 2);
function myplugin_remove_type_attr($tag, $handle) {
return preg_replace( "/type=['\"]text\/(javascript|css)['\"]/", '', $tag );
}
Thanks!