WordPress.org

Ready to get started?Download WordPress

Forums

Parse error: syntax error, unexpected $end - HELP (2 posts)

  1. burrit0s
    Member
    Posted 1 year ago #

    Hello all. I am using theme grey white black.

    So all of a sudden today I was met with the error message

    Parse error: syntax error, unexpected $end in /home/burrito/public_html/wp-content/themes/lightshow-child-2/page-forum.php on line 23

    when I tried to view my page. Here is my .php custom page template. I can't find anything wrong. Any suggestions?

    <?php
    /*
    Template Name: Forum Page
    */
    ?>
    <?php get_header(); ?>
    <div class="community">
    	<?php if (have_posts()) while (have_posts()) : the_post(); ?>
    		<div class="box full-post">
    
    			<p class="categories"> <?php the_category(" "); ?></p>
    
    			<?php wp_link_pages(array('before' => '<p class="pages"><strong>'.__('Pages', 'gray_white_black').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    		</div>
    		<?php if ( comments_open() ) : ?>
    
    		<?php endif; ?>
    		<p class="pages"><?php wp_link_pages(); ?></p>
    </div>
    
    <?php get_footer(); ?>
  2. vtxyzzy
    Member
    Posted 1 year ago #

    You are missing an endwhile statement like this:

    <?php endif; ?>
    <p class="pages"><?php wp_link_pages(); ?></p>
    	<?php endwhile; ?>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.