WordPress Loop not outputting all expected elements (2 posts)

  1. leftblanx
    Posted 6 years ago #

    I'm having a strange problem with a WordPress Loop.

    The loop code is at 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?

  2. MichaelH
    Posted 6 years ago #

    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');

Topic Closed

This topic has been closed to new replies.

About this Topic