Pulling out Child-Cat Posts within a Page
-
Im trying to pull out certain child-cat posts on a page, but it seems as if i can only do it to parent level.
<b>Code Sample</b>
<?php rewind_posts(); ?>
<?php
$query = 'cat=5,7&showposts=6';
query_posts($query);
?>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<?php if ( in_category('5') ) { ?>
<?php $cat = get_the_category();$cat = $cat[0];?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="meta"><span><?php the_time('F dS Y') ?></span><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit',' - ',''); ?></div>
<a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><h1 class="news-<?php echo $cat->cat_ID;?>"<?php if(c2c_get_custom('splash')!=NULL){echo 'style="background:url(wp-content/themes/reason/images/splash/'.c2c_get_custom('splash').')"';}?>><?php the_title(); ?></h1></a>
<div class="entry">
<?php the_content('Read the rest of this entry ???'); ?>
</div>
</div>
<?php }?>
<?php endwhile; ?>I assume the query_post() function is limited to parents only?
Any help would be great!
- The topic ‘Pulling out Child-Cat Posts within a Page’ is closed to new replies.