2015-06-20 46 views
1

我试图关注this video tutorial(在YouTube上)。开发Wordpress主题时出现奇怪的错误

但是,我收到这个我无法理解的奇怪的错误。

我已经包含的图像显示错误:

image-of-error

我检查了我的代码100倍,并已与教程代码进行了比较,我认为错误是index.php

代码PHP:

<!doctype HTML> 
<html> 
    <head> 
     <meta charset="utf-8"></meta> 
     <title><?php bloginfo('title')?></title> 
     <link rel="stylesheet" href="<?php bloginfo('stylesheet_url')?>" 
       <?php wp_head()?> 
     </head> 
     <body> 

     <header> 
      <h1><?php bloginfo('name')?></h1> 
     </header> 


    <div id="container"> 

的index.php

<?php get_header()?> 
<div> 
    <?php while (have_posts()):the_post()?> 
    <h2><?php the_title()?></h2> 
    <?php the_content(__('contie_reading'));?> 
    <?php endwhile;?> 
</div> 

<?php get_footer()?> 
<?php get_sidebar()?> 

FOOTER.PHP

</div> 

<footer> 
    <?=date('y')?> Copyright Never 
</footer> 

</body> 
</html> 

你知道在哪里这是否重要?我搜索解决,不幸的是我没有找到。

+0

多个问题,那有些JavaScript代码片段没有正确包含。在wp_head中查找,因为其中包含javascript。 – peoples

回答

2

您的header.php文件中有一个损坏的链接标记。

更改此:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url')?>" 

要:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url')?>"> 

虽然这样可以解决问题的手,我劝你找一个不同的教程。

有与你采取诸如包括样式表头部分,而不是进行排队它们,使用PHP短标签,放置在侧边栏页脚后,这似乎是办法,等

+0

非常感谢! – cristi