user3852799 user3852799 - 3 months ago 8
PHP Question

Head content appears in the body tag (Wordpress)

My head content(metas, scripts etc.) appears in the body tag. I have header php with this code

<!DOCTYPE html>
<html <?php language_attributes(); ?>>

<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device=width">
<title<?php bloginfo('name'); ?></title>
<?php wp_head(); ?>

<header class="header">
<h1 id="logo"><a href="<?php echo home_url(); ?>">|||</a></h1>
<h4 id='title' ><?php the_title(); ?></h4>


and footer.php is closing it with this. `

<?php wp_footer(); ?>

Already tried changing encoding from UTF-8 to UTF-8 without BOM using Notepad++, and still the same ,, this is my website if you wanna see with inspect [website]

website . Any ideas ? :S


Your html is broken:

<title> Name Lastname / Official Website</title>
      ^---- missing >