0

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.

1

1 Answer 1

-1

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();

?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.