Hi,
I'm trying to display a category parent, but would like to leave out the category children.
This is my code:
<?php query_posts(
array(
'category_name' => 'Category',
'posts_per_page' => 3,
'order' => 'DESC'
)); ?>
Do I use some sort of exclude?
I know how to display just the parent (if I am on the category page):
<?php
if ( is_category() ) {
$cat = get_query_var('cat');
query_posts(array('category__in' => array($cat), 'posts_per_page' => -1));
}
?>
but not if I define the parent by name (in some cases I want to display a certain category on another page).