2014-02-10 49 views
-2

如果任何人都可以用我的代码来帮助我,那将很棒。我一直收到这个错误,在第16行。每当我在我的网站上打开一篇文章,我得到的错误。页面似乎工作正常。解析错误:语法错误,第16行出现意外的T_CLASS single.php

<?php if (have_posts()) while (have_posts()) : the_post(); ?> <h3 class="subtitle"><?php echo get_post_meta($post->ID, 'sb_subtitle', 'true'); ?></h3> 
      <h1 class="page-title"><?php the_title(); ?></h1> 
      <p class="postmetadataw">Posted by: <?php the_author_posts_link() | on <span class="post_date"><?php the_time('F j, Y'); ?></p> 

      <div class="content-ver-sep"> </div> 
      <div class="entrytext"><?php the_post_thumbnail('category-thumb'); ?> 
      <?php the_content(); ?> 

我一直在试图与这些错误修复我的结构化数据:

hatom-feed 
hatom-entry:  
Error: At least one field must be set for HatomEntry. 
Error: Missing required field "entry-title". 
Error: Missing required field "updated". 
Error: Missing required hCard "author". 
Error: At least one field must be set for HatomEntry. 
Error: Missing required field "entry-title". 
Error: Missing required field "updated". 
Error: Missing required hCard "author". 
+1

没人在意猜测第16行是什么。 – PeeHaa

+0

我猜测第16行包含'<?php the_author_posts_link()',它缺少php结束标记'?>'。 – Duroth

+0

这是什么?不关闭---><?php the_author_posts_link() –

回答

0

你没有关闭PHP部分与the_author_posts_link。尝试:

<p class="postmetadataw">Posted by: <?php the_author_posts_link(); ?> | on <span class="post_date"><?php the_time('F j, Y'); ?></p> 
+0

谢谢<?php the_author_posts_link(); ?>做了工作:) – user3293296

相关问题