I have a custom post type called “Club” I also have a child custom post type for Clubs called “Project”
I want to display the children (Projects) on the single page of the parent (Club).
At the moment, the query displays all children (Projects) on all of the Parents single pages (Clubs). Where am I going wrong?
$args = array('child_of' => $post->ID; 'post_type' => 'project', 'posts_per_page' => 120 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post();
- The topic ‘Querying children custom post types’ is closed to new replies.