Pergunta

I don't know why I get this error when I validate my site, but clearly I am doing something wrong because I get the following error too: "An body element start tag seen but an element of the same type was already open"

<!DOCTYPE html>
<html lang="en-uk">
<head>
<title> Erasmus+</title>
<meta name="author" content="" />
<meta name="dcterms.rights" content="" />
<meta name="" />
<meta name="keywords" content="" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

<link href="" type="text/css" />
<link href="" type="text/css" />
<link rel="stylesheet" type="text/css" href="" />
<link rel="shortcut icon" type="image/x-icon" href="" />
<?php wp_head();?>     
<!--[if !IE]><!-->
<style>

</style>
<!--<![endif]-->

<script>
</script>
</head>

<body class="home blog">

It is a wordpress website: www.erasmus-plus.ro I can't find what I am doing wrong. Thanks! Edit: I see that if I remove

<?php wp_head();?> 

the error is gone, but isn't it needed for wordpress files?

Foi útil?

Solução

That's not the complete HTML code. Looking at the source, apparently you have:

<input type='hidden' value='http://erasmus-plus.ro/wp-content/plugins/form-maker' id='form_plugins_url' />

In line 41. That's "displayable" code, so I think it's making that the head part closes and opening the <body> implicitly, and hence complaining when it gets to your explicit tag.

I guess that some stray plugin is misbehaving using wp_head to insert that into your . Try disabling your plugins one by one and you'll probably find the culprit. Probably something related to forms?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top