Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Template Name: Productoverzicht (NL)
- get_header(); ?>
- <div id="content-wrap" class="container clr">
- <?php wpex_hook_primary_before(); ?>
- <div id="primary" class="content-area clr">
- <?php wpex_hook_content_before(); ?>
- <div id="content" class="site-content clr">
- <?php wpex_hook_content_top(); ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php wpex_get_template_part( 'page_single_blocks' ); ?>
- <section class="vc_section padding_content normal">
- <div id="filters" class="vc_row wpb_row vc_row-fluid">
- <div class="wpb_column vc_column_container vc_col-sm-12">
- <form action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST" id="filter">
- <?php
- if( $terms = get_terms( 'tag_names', 'orderby=name' ) ) :
- echo '<div class="select_dropdown"><select name="names"><option>Filter op plantnaam</option>';
- foreach ( $terms as $term ) :
- echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
- endforeach;
- echo '</select></div>';
- endif;
- if( $terms = get_terms( 'tag_flower_colors', 'orderby=name' ) ) :
- echo '<div class="select_dropdown"><select name="flower_colors"><option>Filter op bloemkleur</option>';
- foreach ( $terms as $term ) :
- echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
- endforeach;
- echo '</select></div>';
- endif;
- if( $terms = get_terms( 'tag_leaf_colors', 'orderby=name' ) ) :
- echo '<div class="select_dropdown"><select name="leaf_colors"><option>Filter op bladkleur</option>';
- foreach ( $terms as $term ) :
- echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
- endforeach;
- echo '</select></div>';
- endif;
- ?>
- <button id="reset_btn">Reset filter</button>
- <input type="hidden" name="action" value="myfilter">
- </form>
- </div>
- </div>
- <div class="vc_row wpb_row vc_row-fluid" id="results">
- <?php query_posts( array('post_type'=> 'portfolio', 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => -1) ); while ( have_posts() ) : the_post(); echo get_template_part( '/page-element-assortiment' ); endwhile; wp_reset_query(); ?>
- </div>
- </section>
- <?php endwhile; ?>
- <?php wpex_hook_content_bottom(); ?>
- </div><!-- #content -->
- <?php wpex_hook_content_after(); ?>
- </div><!-- #primary -->
- <?php wpex_hook_primary_after(); ?>
- </div><!-- .container -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement