解析错误:语法错误,第56行woocommerce.php中的文件意外结束

解析错误:语法错误,第56行woocommerce.php中的文件意外结束,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,您好,当我试图在woocommerce中查看我的产品时,在第56行的woocommerce.php中收到以下错误消息Parse error:syntax error,意外的文件结尾。这是该文件的代码。第56行是最后一行 "> 这个的结尾在哪里 <?php if ( have_posts() && !is_404() ) : ?> 您有未关闭的IF语句: <?php if ( have_posts() && !is_404() ) : ?>

您好,当我试图在woocommerce中查看我的产品时,在第56行的woocommerce.php中收到以下错误消息Parse error:syntax error,意外的文件结尾。这是该文件的代码。第56行是最后一行

">


这个的结尾在哪里

<?php if ( have_posts() && !is_404() ) : ?>

您有未关闭的IF语句:

<?php if ( have_posts() && !is_404() ) : ?>


尝试添加或删除:symbol如果您只想将其用于next,而这是无错误代码,您没有关闭
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' ); ?>


a)在发布答案一个多小时后,从字面上窃取答案;b)从字面上为他人编写代码,而不是教授他们。如果你想为他人编写代码,找份工作。此网站是为了帮助他人学习,而不是为他们做事。在投下否决票之前,你是否也阅读过此内容?”您没有关闭答案中的
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' ); ?>