title: for loop on a "wp_query" object in Wordpress
body: <p>I need to check if any of the children items of the next object have children themselves.
  I thought to do it with a for loop but I am not sure how to go about it.</p>
  
  <p>The object is as below:</p>
  
  <pre><code>$children = new WP_Query(array('post_type'=&gt;'page', 'post_parent'=&gt;get_the_ID(), 'post_status'=&gt;'publish','orderby'=&gt;'menu_order','order'=&gt;'ASC')); 
  </code></pre>
  
  <p>Thank you in advance :)</p>