exclude categories when NOT using wp_list_categories
-
Hi all,
I am using the following script to show all my categories with images as background (taken from here):
<?php $category_ids = get_all_category_ids(); foreach($category_ids as $cat_id) { $cat = get_category($cat_id); $link = get_category_link( $cat_id ); ?> <div class="cat-image"> <a href="<?php echo $link; ?>" title="link to <?php echo $cat->name; ?>"> <img src="<?php bloginfo('template_url'); ?>/images/<?php echo $cat->slug; ?>.jpg" /> </a> </div> <?php } ?>
The problem is that this script shows all categories with no exceptions and there are some specific categories that I want to exclude from this list. how do I exclude specific categories from the list using this script?
Thanks,
Eyal.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘exclude categories when NOT using wp_list_categories’ is closed to new replies.