I want to create some future posts under one parent post, in that case in think relationship in WordPress posts is better option for me. So anyone who know about my question.
-
You can create hierarchical post types. – cybmeta Jul 7 '17 at 7:05
first you can know the relationship between child post and parent post try to figure it out or just try this code
$query = new WP_Query( array(
'post_parent' => get_theID(),
'posts_per_page' => 3, //shows only 3 children. If you want to show all of them, comment this line
));
while($query->have_posts()) {
$query->the_post();
/*Output the child markup here*/
the_content(); //Outputs child's content as it is
}
wp_reset_query();
?>