I have a website. There the following structure:
Parent Category:
Child category 1
Child category 2
In Parent Category I need display all posts of child category.
I write next WP query:
<?php
$child_pages = new WP_Query(array(
'post_type' => 'post',
'category__in' => 5,
'posts_per_page' => 3,
'order' => 'ASC',
'orderby' => 'title',
)
);
?>
For the argument 'category__in' I set Parent category ID (its Parent category ID). But it is not working. In parent category posts not displayed.
How i get all child category posts on parent category?
Guys, and sorry for my English. Im in learning.. Yes, I'm ashamed))