I'm utilizing a custom publish key in my wordpress theme, and that i need assistance using the loop. Here's my code:

<?php $loop = new WP_Query( array( 'post_type' => 'magazine', 'posts_per_page' => 10 ) ); ?>
     <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
         <li>
             <?php the_post_thumbnail( 'magazine' ); ?>
             <h2><?php the_title( ); ?></h2>
             <?php the_content;?>
         </li>
     <?php endwhile; ?>

This returns the ten latest posts within the custom area "magazine". I would like it to only display the mother and father within the custom area "magazine". Much like pages, my custom fields have characteristics, so that you can choose a hierarchy (parent/child). I wish to edit the loop therefore it only returns the mother and father (the most recent issues from the magazine, not the articles within each problem) Does anybody understand how to do this while using wordpress loop above?

Just add 'post_parent' => 0 towards the args array.

<?php $loop = new WP_Query( array( 'post_type' => 'magazine', 'posts_per_page' => 10, 'post_parent' => 0 ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
     <li>
         <?php the_post_thumbnail( 'magazine' ); ?>
         <h2><?php the_title( ); ?></h2>
         <?php the_content;?>
     </li>
<?php endwhile; ?>