Title: Offset loop for related posts
Last modified: August 20, 2016

---

# Offset loop for related posts

 *  [japanworm](https://wordpress.org/support/users/japanworm/)
 * (@japanworm)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/offset-loop-for-related-posts/)
 * Hello.
 * I wanted to create an offset loop for my related posts which are wrapped by a
   scrollable container. I want the newest 4 related posts show up in the first 
   div, the next 4 in the next container, this should go up to 12.
 * My original setup looked like this:
 * _[code moderated - please follow the [forum guidelines for posting code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)]_
 * Then, I tried something like that, but I keep getting syntax errors such as **"
   syntax error, unexpected T_ENDWHILE"**:
 * _[dito]_
 * I'm really going crazy here and have tried to close tags at all sorts of places,
   but it just doesn't work. I hope somebody here can help me figure out where I
   went wrong. Thanks a lot!

The topic ‘Offset loop for related posts’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [japanworm](https://wordpress.org/support/users/japanworm/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/offset-loop-for-related-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
