Query does not return content
You shouldn’t be using query_posts()
here, but rather WP_Query()
. (Search WPSE for query_posts
if you want to know wy.)
<?php
$custom_query_args = array(
'post_type' => 'page',
'post_parent' => '50',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
'posts_per_page' => '100'
);
$custom_query = new WP_Query( $custom_query_args );
// To see the contents of the $custom_query object
var_dump( $custom_query );
?>
Edit
No dice. Same result.
The query is returning exactly what it is intended to return. In order to access the $post
data, you need to set up the Loop:
if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post() );
// The $post variable is now available,
// so you can access the post content, either as
// $post->post_content or as the_content()
endwhile; endif;
So, I’m guessing your problem is that you’re not setting up the Loop.