I am configurating a HTML website to WordPress with PHP. But I keep getting these “Errors” on https://validator.w3.org/:
It regards these 2 codes that I put in header.php:
'items_wrap' => '<ul class="top-menu"><li><a href="<?php get_permalink()?></a></li>%3$s</ul>'
'items_wrap' => '<ul class="nav-menu"><li class="nav-item"><a href="<?php get_permalink()?> class="nav-link"</a></li>%3$s</ul>
I get these errors:
Error: No space between attributes.
Error: Saw < when expecting an attribute name. Probable cause: Missing > immediately before.
Error: A slash was not immediately followed by >.
Error: Bad value for attribute href on element a: Illegal character in path segment: < is not allowed.
Error: Attribute < not allowed on element a at this point.
Error: End tag li seen, but there were open elements.
Error: Unclosed element a
Error: Start tag a seen but an element of the same type was already open.
Error: No a element in scope but a a end tag seen.
I am not yet that strong in PHP, and I have tried to remove all a and li, but that only created other “errors” at validator.
So, i understand the these 2 code lines are not properly created. I got these codes from a Youtuber. So what should I do, so these two code lines will pass in validator?