Title: Problem styling the End While
Last modified: August 18, 2016

---

# Problem styling the End While

 *  [ibeats](https://wordpress.org/support/users/ibeats/)
 * (@ibeats)
 * [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/)
 * i believe i need to apply a class to the end while to keep the style going throughout
   things like my search but when i do, i always end up with an empty box at the
   bottom after the results.
 * an example can be seen -> [http://www.jamesvincent.co.uk/wordpress/index.php?s=quivver&submit=Search](http://www.jamesvincent.co.uk/wordpress/index.php?s=quivver&submit=Search)
 * if i dont apply a style:
 * <div class=”entrybody”>
    <div class=”entry”>
 *  <?php endwhile; ?>
 *  </div>
    </div>
 * then, only my first result is styled. is there anything i can do?

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

 *  [Christopher J. Hradil](https://wordpress.org/support/users/chradil/)
 * (@chradil)
 * [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/#post-392407)
 * if you zip and send me the style.css and search.php files for your theme, I’ll
   take a look.
 * email addy is chradil at comcast dot net
 *  Thread Starter [ibeats](https://wordpress.org/support/users/ibeats/)
 * (@ibeats)
 * [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/#post-392468)
 * email sent, the issue is happening on cateogires and archives too.. its something
   to do with styling that endwhile;
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/#post-392485)
 * _its something to do with styling that endwhile;_
 * That sounds strange: the “endwhile” is the closing bit of The Loop and doesn’t
   really get displayed on the site… so how do you “style” the nothing?
    I’d rather
   suspect it is an issue with nested/unclosed div tags.
 *  Thread Starter [ibeats](https://wordpress.org/support/users/ibeats/)
 * (@ibeats)
 * [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/#post-392487)
 * if i dont style the ‘endwhile;’ then only the first post gets styled… in my case
   styling the endwhile; causes all the posts to be styled, but gives a blank box.
 * i know how stupid it sounds, its just the only way i can get it to display how
   i want.

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

The topic ‘Problem styling the End While’ is closed to new replies.

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [end](https://wordpress.org/support/topic-tag/end/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [style](https://wordpress.org/support/topic-tag/style/)
 * [while](https://wordpress.org/support/topic-tag/while/)

 * 4 replies
 * 3 participants
 * Last reply from: [ibeats](https://wordpress.org/support/users/ibeats/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/problem-styling-the-end-while/#post-392487)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
