How to: Block category from showing
-
Hi folks,
So basically I have this problem which is maybe a really small one but my brain’s dead for last couple of weeks for I have been updating my repository…
I have constructed my front-page so it shows posts from categories I want, due to having to create additional category for the custom content slider I have created my self a problem, when chosen to be in its category and in slider every post on it’s category tag fetches the “slider” category name, so I really need a way to let him fetch the category for the tag but exclude slider one here’s the code:
<?php $vijest = new WP_Query('showposts=4&cat=1'); while($vijest ->have_posts()) : $vijest->the_post(); ?> <?php $category = get_the_category(); ?> <div class="post-categories"><a href="#"><?php echo $category[0]->cat_name; ?></a></div>
So, as You can see I need to some how change this:
<?php echo $category[0]->cat_name; ?></a></div>
In which certain category will never be echoed…
Any thoughts?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to: Block category from showing’ is closed to new replies.