Archived topic
W3C validation error
5 replies · Started by A. R. Choudhury on March 30, 2021
Hello, I'm getting some W3C validation errors. Please check: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.nutritioncrown.com%2Funcategorized%2Fwelcome%2F
Also I'm getting some warnings here: https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.nutritioncrown.com%2Funcategorized%2Fwelcome%2F&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en#warnings
Hi there,
the HTML validation errors are coming from two plugins:
1. The Social Sharing links
2. The Author box.
you would have to address those issues with the plugin developers.
The CSS warnings in the second validation can be ignored... they are CSS prefixes required for old browser support.
I have disabled those two plugins but I'm getting this one error: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.nutritioncrown.com%2Fnutrition%2Fwhat-is-nutrition%2F
Try adding this PHP Snippet to your site:
add_filter( 'comment_form_defaults', function( $defaults ) {
$defaults['comment_field'] = sprintf(
'<p class="comment-form-comment"><label for="comment" class="screen-reader-text">%1$s</label><textarea id="comment" name="comment" cols="45" rows="8" required></textarea></p>',
esc_html__( 'Comment', 'generatepress' )
);
return $defaults;
}, 20 );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Thanks, David. Problem solved.
Glad to hear that