Title: parse error
Last modified: August 19, 2016

---

# parse error

 *  Resolved [whiteduck](https://wordpress.org/support/users/whiteduck/)
 * (@whiteduck)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/parse-error-75/)
 * I have been following a book “WordPress 3 site blueprints” but have parse errors
   on page.php and single.php
    The error message is Parse error: syntax error, unexpected
   $end in wp-content/themes/retroTheme/page.php on line 17 (Line 17 is the last
   line)
 * The code for the page is:
    <?php get_header(); ?> <!–begin main content–> <div
   id=”content”> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post();?
   > <div id=”post-<?php the_ID(); ?>”><?php the_title(); ?></div> Posted in <?php
   the_category(‘, ‘) ?> by <?php the_author() ?> on <?php the_time(‘F jS, Y’) ?
   > | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No 
   Comments’, ‘1 Comment’, ‘% Comments’); ?>
 * <?php the_content(‘ ‘); ?>
    <?php comments_template(); ?> <?php endwhile; ?> 
   <!–end main content–> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
 * thanks WD

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/parse-error-75/#post-1799485)
 * your code is missing the corresponding `</php endif; ?>` for the line `<?php 
   if (have_posts()) : ?>`
 * last few lines rewritten:
 *     ```
       <?php endwhile; ?>
       <!--end main content-->
       </php endif; ?>
       </div>
       <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [whiteduck](https://wordpress.org/support/users/whiteduck/)
 * (@whiteduck)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/parse-error-75/#post-1799493)
 * thanks so much
    much appreciated cheers WD

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘parse error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [whiteduck](https://wordpress.org/support/users/whiteduck/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/parse-error-75/#post-1799493)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
