Home › Forums › Jevelin Theme › 3WC Warning in
Home › Forums › Jevelin Theme › 3WC Warning in
Running the W3C validator for https://cbdfactum.com generates +50 warnings like this:
The
typeattribute for thestyleelement is not needed and should be omitted.
or
The
typeattribute is unnecessary for JavaScript resources.
<b><script type="text/javascript" data-cfasync="false"></b>
or
<b><script data-cfasync="false" data-pagespeed-no-defer type="text/javascript"></b>
See also the attached result of the validation.
I get rid of the warnings using this hook- so you won’t see currently it on the site.
add_action( 'template_redirect', function(){
ob_start( function( $buffer ){
$buffer = str_replace( [ 'type="text/javascript"', "type='text/javascript'", "type='text/css'", 'type="text/css"' ], '', $buffer );
return $buffer;
});
});I think, in one of the next updates the code could be modified so this hook is not needed and the theme generates out of the box a code without W3C warnings.
What do you think?
Thx
Hi @CBDFactum,
I hope you are well today and thank you for your question.
We will check how the default WordPress themes handle this situation and then will consider to change it if it doesn’t have any side effects.
Also, we can only change it for the scripts generated by the theme and not the plugins.
Best regards,
Shufflehound team
If you need services beyond standard support, we've got your back!
If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.
We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.
More complex styling changes, theme option modifications, and third-party integrations.
If you need something that's not included in the theme, we can code it for you.
Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.
Full website builds, custom theme development, or plugin creation from scratch.
We'll provide a clear quote based on what you need. No hidden fees.