Title: WordPress Loop not outputting all expected elements
Last modified: August 19, 2016

---

# WordPress Loop not outputting all expected elements

 *  [leftblanx](https://wordpress.org/support/users/leftblanx/)
 * (@leftblanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/wordpress-loop-not-outputting-all-expected-elements/)
 * I’m having a strange problem with a WordPress Loop.
 * The loop code is at [http://pastebin.com/xudSE6qa](http://pastebin.com/xudSE6qa),
   and I am expecting five list elements to be output (corresponding to the five
   entries of the post__in parameter array). However, the output of the loop only
   returns 4 list elements, and not displaying the final expected element of the
   loop.
 * If I delete another (non-final) entry of the post__in array, four list elements
   are again returned, but this time including one corresponding to the final entry
   in the array.
 * Why is my loop only outputting up to four elements?

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/wordpress-loop-not-outputting-all-expected-elements/#post-1483656)
 * May need to fix your args
 *     ```
       $args = array(
         'post_type' => "page",
         'post__in' => array(763, 765, 760, 774, 768),
         'orderby' => 'menu_order',
         'posts_per_page' => -1,
         'caller_get_posts'=> 1,
         'order' => 'ASC');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘WordPress Loop not outputting all expected elements’ is closed to new
replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/wordpress-loop-not-outputting-all-expected-elements/#post-1483656)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
