How to exclude category from get_the_category?
-
Hello,
Can someone please give me a little help here?
I need to exclude a category (ID76) from listing, but I’m too newbie to do this. I already searched for a solution but couldnt do it myself.Here’s my code:
<?php $categories = get_the_category(); if($categories){ ?> <div id="includes">CATEGORIES</div> <?php foreach ( $categories as $category ) { echo '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ><div class="tags">'.$category->name.'</div></a>'; } ?>
Thank you guys! ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to exclude category from get_the_category?’ is closed to new replies.