Specify which categories appear in filter navigation
-
hi,
I have about 20 categories but only want my users to be able to filter by 5 of those 20 categories. Can i somehow limit which categories appear in the filter menu?
I’ve been looking at this code in the head.php
<?php if(is_page()): ?> <nav id="primary-nav"> <div class="container"> <a href="#">show/hide</a> <div class="columns sixteen"> <div class="nav-label"><?php _e('Filter By:','sampression'); ?></div> <ul class="nav-listing clearfix"> <li><a href="#"><span></span><?php _e('Show All','sampression'); ?></a></li> <?php $categories = get_categories(); foreach($categories as $category): ?> <li><a href="void(0);">slug; ?>" id="<?php echo $category->slug; ?>" class="filter-data"><span></span><?php echo $category->name; ?></a></li> <?php endforeach; ?>
I suspect it has something to do with
<?php echo $category->name; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Specify which categories appear in filter navigation’ is closed to new replies.