Всем привет!
Пытаюсь пройти валидацию validator.w3.org
и запнулся об такую ошибку:
Start tag body seen but an element of the same type was already open.
Пишет, что боди уже открыт. Блин! Понять не могу, как сие исправить.
А следом идет другая ошибка:
Cannot recover after last error. Any further errors will be ignored.
На сколько я понял, дальнейшие ошибки будут игнорироваться, пока не вылечу первую...
Что бы вам не Ванговать вот участок кода:
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter = new Ya.Metrika({
id:,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
trackHash:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<!-- /Yandex.Metrika counter -->
<meta name="yandex-verification" content="" />
<link rel="icon" href="http://spkural.ru/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://spkural.ru/favicon.ico" type="image/x-icon">
<meta name="yandex-verification" content="" />
</head>
<noscript><div><img src="https://mc.yandex.ru/watch/" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<?php if(isset($_POST['scrollPosition'])): ?>
<body <?php body_class(); ?> onLoad="window.scrollTo(0,<?php echo intval($_POST['scrollPosition']); ?>)">
<?php else: ?>
<body <?php body_class(); ?> >
<?php endif;
zerif_top_body_trigger();