Checking if category has posts
-
Hi,
I would like to do such thing :
I’ve got a table which displays posts from category ‘test’. Posts are displayed using standard
<?php query_posts('category_name=test&showposts=3'); ?> <?php while (have_posts()) : the_post(); ?>
But i’d like to add another loop above this loop (and above the wrapper that this loop is inside of) so it would check if the category ‘test’ has posts – if so go and do the loop mentioned above, if not – display nothing. Or maybe there is another way to hide a theme module ?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Checking if category has posts’ is closed to new replies.