Hi, I have a custom post type (cars)
And in this I have parent and child posts. On the single page of a parent post I would like to show child posts, can anyone help me with the loop for this? I googled but didn’t really find what I am looking for… maybe I just suck at googling.
My current code:
$args = array(
'post_type' => 'cars',
'posts_per_page' => '-1',
'post_child' => 0
);
$the_query = new WP_Query($args);
if (have_posts()): while ($the_query->have_posts()): $the_query->the_post(); ?>
..................
<?php endwhile; endif; ?>