I've created custom post type "Services" with 'hierarchical' => true,
. My loop is simple:
while (have_posts()) {
the_post();
get_template_part('content', get_post_type());
}
In admin I have next structure:
- Service 1
- Service 2
- Sub-service
The problem is that on Services page I have all of them. But I want only 1 level posts without children posts. And children posts should be inside parent post. How can I do that?