title: Wordpress get_page_children failing for no reason
body: <p>I have this code running a sub page navigation in a  wordpress theme.</p>
  
  <p>This is working perfectly elsewhere. This virtually unaltered from the codex page for get_page_children. I have checked <code>$post-&gt;ID, $subpage_query</code> and <code>$all_pages</code> and everything looks fine. It just refuses to populate the <code>$page</code> variable for no apparent reason.</p>
  
  <pre><code>&lt;div class="sub-pages"&gt;
  
                          &lt;?php
                          $subpage_query = new WP_Query();
                      $all_pages = $subpage_query-&gt;query(array('post_type' =&gt; 'page', 'orderby' =&gt; 'date'));
                      $subpages = get_page_children( $post-&gt;ID, $all_pages );
  
                          $pa = 0;
                          foreach ($subpages as $k =&gt; $page) {
  
                              if ($pa &gt; 3) {
                                  break;
                              }?&gt;
  
                              &lt;div class="sub-page"&gt;
  
                                  &lt;a href="&lt;?php echo get_permalink($page -&gt; ID); ?&gt;"&gt;
                                  &lt;div class="overload"&gt;&lt;?php echo get_the_post_thumbnail( $page -&gt; ID, 'medium'); ?&gt;&lt;/div&gt;
                                  &lt;p&gt;&lt;?php echo $page -&gt; post_title; ?&gt;&lt;/p&gt;
                                  &lt;/a&gt;
                              &lt;/div&gt;
  
                          &lt;?php $pa++; } ?&gt;
                      &lt;/div&gt;
  </code></pre>