Title: `endwhile` without a `while` in `templates/content-likes.php`
Last modified: August 21, 2016

---

# `endwhile` without a `while` in `templates/content-likes.php`

 *  Resolved [Jason Cosper](https://wordpress.org/support/users/boogah/)
 * (@boogah)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/endwhile-without-a-while-in-templatescontent-likesphp/)
 * I’ve got PHP syntax checking on as a pre-deploy step in my git workflow and it
   complains when I try to push the latest version of WTI Like Post up to the server:
 * `remote: - info: checking wp-content/plugins/wti-like-post/templates/content-
   likes.php ...
    remote: PHP Parse error: syntax error, unexpected T_ENDWHILE in-
   on line 38 remote: - warning: syntax Error Found in wp-content/plugins/wti-like-
   post/templates/content-likes.php ...
 * From what I can see, you have an `endwhile` without a `while` in your `if` statement
   and PHP doesn’t care for that.
 * Just thought I’d give y’all a heads up!
 * [https://wordpress.org/plugins/wti-like-post/](https://wordpress.org/plugins/wti-like-post/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/endwhile-without-a-while-in-templatescontent-likesphp/#post-4769116)
 * Thanks for pointing that out. It should be `endforeach` instead of `endwhile`.
   This template file is just for instructions only and one has to customize/correct
   this for own purpose.
 * I am sure the file you are referring is only for the PRO version and you are 
   pushing to GIT for personal purpose only. This forum is for free plugins only
   so can you please put the same in the [PRO Support Forum](http://support.webtechideas.com/forums/forum/wti-like-post-pro/)
   in case there is any other discussion needed.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘`endwhile` without a `while` in `templates/content-likes.php`’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wti-like-post_0f88b8.svg)
 * [WTI Like Post](https://wordpress.org/plugins/wti-like-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wti-like-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wti-like-post/)
 * [Active Topics](https://wordpress.org/support/plugin/wti-like-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wti-like-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wti-like-post/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/endwhile-without-a-while-in-templatescontent-likesphp/#post-4769116)
 * Status: resolved