doulu2011 2015-07-23 20:09
浏览 70
已采纳

头部内容出现在body标签中(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(); ?>>

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

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

<body>

and footer.php is closing it with this. `

<?php wp_footer(); ?>
</body>
</html>`

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

  • 写回答

1条回答 默认 最新

  • dqvzfp6468 2015-07-23 20:12
    关注

    Your html is broken:

    <title> Name Lastname / Official Website</title>
          ^---- missing >
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?