-1

Hi I'm getting this error message Parse error: syntax error, unexpected end of file in woocommerce.php on line 56, when I am trying to view my products in woocommerce. Here is the code for that file. Line 56 is the last line.

">
<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' ); ?>

user3084340
  • 1
  • 1
  • 2

3 Answers3

2

Where's the endif for this:

<?php if ( have_posts() && !is_404() ) : ?>
skrilled
  • 5,350
  • 2
  • 26
  • 48
2

You have unclosed IF statement:

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

try to add or delete : symbol if you want to use it only with next while

BaBL86
  • 2,602
  • 1
  • 14
  • 13
0

Here is the error free code, you are not closing an if statement

<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' ); ?>
Noor
  • 1,351
  • 8
  • 27
  • downvoted for a) stealing an answer literally more than an hour after it was posted and b) literally writing someone's code for them instead of teaching them. if you want to write code for people, get a job. this site is to help people learn, not do things for them. – skrilled Dec 10 '13 at 23:15
  • Before downvoting did you also read this " you are not closing an `if` statement" in the answer – Noor Dec 11 '13 at 07:04