Support Forums

Support Forums Forums General Support Validation Warnings

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Trevor 9 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Roxane Lapa

    Hi there

    If I run my site through the W3C validation checker, it is almost perfect except for a few warnings generated because of mods, and yours is one if them. They are really simple to fix, so I would appreciate it if you could do this in your next up date.

    Basically every time you use the script tag, for example:
    <script type=’text/javascript’ src=’′></script>

    You need to leave of the type attribute, so it would be this instead:
    <script src=’′></script>

    There are a few places the script tag is used where the type attribute needs to be removed.

    Trevor Moderator

    I have a feeling this is WordPress doing this, as we simply enqueue the files (but I could be wrong). This post might help you:

    Trevor Moderator

    As a follow up, this is the code that would need to go in to your child theme’s functions.php file:

    add_action( 'template_redirect', function(){
        ob_start( function( $buffer ){
            $buffer = str_replace( array( 'type="text/javascript"', "type='text/javascript'" ), '', $buffer );
            return $buffer;

    You could use this in other ways:

    $buffer = str_replace( array( 'type="text/css"', "type='text/css'" ), '', $buffer );
    $buffer = str_replace( array( 'frameborder="0"', "frameborder='0'" ), '', $buffer );
    $buffer = str_replace( array( 'scrolling="no"', "scrolling='no'" ), '', $buffer );
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.