Title: Loop compatibility
Last modified: August 18, 2016

---

# Loop compatibility

 *  [glaughton](https://wordpress.org/support/users/glaughton/)
 * (@glaughton)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/loop-compatibility/)
 * I have a theme which uses the old-style loop i.e.
 * if ($posts) : foreach ($posts as $post) : start_wp();
 * as opposed to the new-style loop i.e.
 * if (have_posts()) : while (have_posts()) : the_post();
 * Will this theme work with WP 2.1? or should I modify the loop code in the theme(
   is this easy?) or should I go back to old version of WP – I’m not sure when the
   loop code was altered)?
 * Any help or advice would be greatly appreciated.

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/loop-compatibility/#post-518992)
 * Since 1.5 the “new style” is in use.
    This might help to figure out where the
   Loop starts and ends: [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 *  Thread Starter [glaughton](https://wordpress.org/support/users/glaughton/)
 * (@glaughton)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/loop-compatibility/#post-519001)
 * OK, thanks. I guess I want to avoid modifying the loop in all the php files if
   possible. So the question is, will the old-style PHP loop code work with WP 2.1?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/loop-compatibility/#post-519003)
 * Good question. I guess nobody tested it yet. It worked up till the 2.0.x versions.

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

The topic ‘Loop compatibility’ is closed to new replies.

## Tags

 * [compatible](https://wordpress.org/support/topic-tag/compatible/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [old](https://wordpress.org/support/topic-tag/old/)

 * 3 replies
 * 2 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/loop-compatibility/#post-519003)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
