Specific category filter
-
Hello.
*This is my first post. If it’s misplaced or not correct in any other way, let me know*
I’m using a portfolio theme for a furniture company. They wanted to sort by product category (Chairs, Tables, Beds) and the a portfolio theme was an obvious choice.
But now they want to ad a new set of filters on another page, by use (Apartment, Hotel, Livingroom).So an product/portfolio item can have two categories (eg. Chair, Hotel).
The problem is that the default filter in the theme can’t select certain categories. It’s ALL or NOTHING.
I need:
- One page filters eg. chairs, beds, tables
- Another page filters eg. Hotels, Bedrooms, kitchen.
The only possible way I can think of, is creating two separat page templates , with separat filter codes. But I’m a novice and can’t figure the code:
Default filter:
<div id="portfolio-filter" class="body3 header_fix clearfix"> <div class="container"> <ul id="filters"> <li><a class="active" href="<?php echo stripslashes(get_option('themnific_url_portfolio'));?>"> <?php _e('All','themnific');?></a></li> <?php wp_list_categories('taxonomy=categories&orderby=ID&title_li='); ?> </ul> </div> </div> <div class="hrlineB"></div> <div class="container"> <ul class="loop folioloop"> <?php query_posts( array( 'post_type' => 'work', 'paged' => $paged, 'posts_per_page' => 12)); if ( have_posts() ) : while ( have_posts() ) : the_post();?> <?php $large_image = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'fullsize', false, '' ); $large_image = $large_image[0]; $another_image_1 = get_post_meta($post->ID, 'themnific_image_1_url', true); $video_input = get_post_meta($post->ID, 'themnific_video_url', true); ?> <li class="col4"> <?php get_template_part('/includes/folio-types/folio-classic'); ?> </li> <?php endwhile; endif; ?> </ul> <div class="clearfix"></div> <div class="pagination"><?php tmnf_pagination('«', '»'); ?></div> <?php wp_reset_query(); ?> </div>
- The topic ‘Specific category filter’ is closed to new replies.