Title: Parse error: syntax error, unexpected &#039;endwhile&#039; (T_ENDWHILE)
Last modified: August 24, 2016

---

# Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE)

 *  Resolved [ShaneLoyer](https://wordpress.org/support/users/shaneloyer/)
 * (@shaneloyer)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/)
 * I’m trying to add more than one page to my wordpress site.
 * After putting in some test text, publishing and trying to view the page it gives
   me this error.
 * Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in /home4/jsexton/
   public_html/hiiromedia.com/wp-content/themes/ares/page.php on line 48
 * The website is:
 * [http://www.HiiroMedia.com](http://www.HiiroMedia.com)
 * Please help with the php code

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

 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/#post-5970160)
 * Can you post the contents of `page.php` to [Pastebin](http://pastebin.com/) and
   post the link here?
 *  Thread Starter [ShaneLoyer](https://wordpress.org/support/users/shaneloyer/)
 * (@shaneloyer)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/#post-5970293)
 * [http://pastebin.com/XiXcxqMz](http://pastebin.com/XiXcxqMz)
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/#post-5970296)
 * You open an `if` block on line 32:
 * `<?php if (is_page('about-us') ): //page 1 ?>`
 * but I don’t see your `endif` anywhere.
 *  Thread Starter [ShaneLoyer](https://wordpress.org/support/users/shaneloyer/)
 * (@shaneloyer)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/#post-5970323)
 * Indeed, I removed the entire background image conditions and it fixed it so the
   pages work now.
 * Interestingly, the background image conditions still work. 🙂
 * Thanks for the help, Stephen.

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

The topic ‘Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE)’ is closed
to new replies.

## Tags

 * [endwhile](https://wordpress.org/support/topic-tag/endwhile/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [ShaneLoyer](https://wordpress.org/support/users/shaneloyer/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endwhile-t_endwhile-2/#post-5970323)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
