您好我收到此错误消息解析错误:语法错误,第56行的woocommerce.php文件意外结束,当我试图在woocommerce中查看我的产品时。这是该文件的代码。第56行是最后一行。
“&GT;<div class="container" role="main">
<div class="row">
<?php do_action( '__before_article_container'); ##hook of left sidebar?>
<div id="content" class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
<?php do_action ('__before_loop');##hooks the header of the list of post : archive, search... ?>
<?php if ( tc__f('__is_no_results') || is_404() ) : ##no search results or 404 cases ?>
<article <?php tc__f('__article_selectors') ?>>
<?php do_action( '__loop' ); ?>
</article>
<?php endif; ?>
<?php if ( have_posts() && !is_404() ) : ?>
<?php while ( have_posts() ) : ##all other cases for single and lists: post, custom post type, page, archives, search, 404 ?>
<?php the_post(); ?>
<?php do_action ('__before_article') ?>
<article <?php tc__f('__article_selectors') ?>>
<?php do_action( '__loop' ); ?>
</article>
<?php do_action ('__after_article') ?>
<?php endwhile; ?>
<?php woocommerce_content(); ?>
<?php do_action ('__after_loop');##hook of the comments and the posts navigation with priorities 10 and 20 ?>
</div><!--.article-container -->
<?php do_action( '__after_article_container'); ##hook of left sidebar?>
</div><!--.row -->
</div><!-- .container role: main -->
<?php do_action( '__after_main_container' ); ?>
答案 0 :(得分:2)
这里的结果在哪里:
<?php if ( have_posts() && !is_404() ) : ?>
答案 1 :(得分:2)
你有未公开的IF声明:
<?php if ( have_posts() && !is_404() ) : ?>
尝试添加或删除:符号,如果您只想在下一次使用时使用
答案 2 :(得分:0)
这是无错误的代码,您没有关闭if
语句
<div class="container" role="main">
<div class="row">
<?php do_action( '__before_article_container'); ##hook of left sidebar?>
<div id="content"
class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
<?php do_action ('__before_loop');##hooks the header of the list of post : archive, search... ?>
<?php if ( tc__f('__is_no_results') || is_404() ) : ##no search results or 404 cases ?>
<article <?php tc__f('__article_selectors') ?>>
<?php do_action( '__loop' ); ?>
</article>
<?php endif; ?>
<?php if ( have_posts() && !is_404() ) : ?>
<?php while ( have_posts() ) : ##all other cases for single and lists: post, custom post type, page, archives, search, 404 ?>
<?php the_post(); ?>
<?php do_action ('__before_article') ?>
<article <?php tc__f('__article_selectors') ?>>
<?php do_action( '__loop' ); ?>
</article>
<?php do_action ('__after_article') ?>
<?php endwhile; ?>
<?php endif; ?>
<?php woocommerce_content(); ?>
<?php do_action ('__after_loop');##hook of the comments and the posts navigation with priorities 10 and 20 ?>
</div>
<!--.article-container -->
<?php do_action( '__after_article_container'); ##hook of left sidebar?>
</div>
<!--.row -->
</div>
<!-- .container role: main -->
<?php do_action( '__after_main_container' ); ?>