Example:
video cat id = 4
video cat child category id’s = 7,8,9
news cat id = 5
news cat child category id’s = 11,12,13
I wanna display choosen categories ( like video and news ) in the different archive.php?
Is it possible thanks.
( sorry about my bad Eng )
Thanks for Chris S but its not what i want to do.
<?php
$catPosts = new WP_Query();
$catPosts->query( array( 'category__and' => array(5,11,12,13), 'posts_per_page' => 5, 'orderby' => 'date', 'order' => 'DESC' ) );
while ($catPosts->have_posts()) : $catPosts->the_post(); ?>
<h1><a href="https://wordpress.stackexchange.com/questions/24423/<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
<div class="meta">
By <?php the_author() ?>
</div>
<div class="content">
<?php the_excerpt(); ?>
</div>
When I wrote the parent category id, i dont wanna write its child category id’s. When i choose the parent category id the system should its child category ids in the same archive page.