Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Querying Child Posts – All Results Aren't Returned?

$
0
0

I'm hoping for some help. I'm trying to query and display child posts, but I cannot get more than five to display. I've verified that there are eight child posts that should be displaying (they all have the same parent post ID# as the value assigned to the '_wpcf_belongs_series_id' key). Below is the code I'm using to query the child posts. (Forgive any messy formatted code.) Thanks in advance for the help.

					<?php $childargs = array(
	            				'post_type' => 'message',
					            'numberposts' => -1,
					            'orderby' => 'post_id',
					            'order' => 'ASC',
					            'meta_query' => array(array('key' => '_wpcf_belongs_series_id', 'value' => get_the_ID()))
				            ); 
						$my_query = new WP_Query($childargs);
 						while ($my_query->have_posts()) : $my_query->the_post(); ?>
   							<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><strong><?php the_title(); ?></strong></a><br/><?php echo types_render_field("message-date", array( )); ?> <?php the_terms( $post->ID, 'speaker', 'by ', ', ', ' ' ); ?></li>
  					<?php endwhile; ?>

Viewing all articles
Browse latest Browse all 20145

Trending Articles