Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. <?php
  2.  
  3. // Template Name: Productoverzicht (NL)
  4.  
  5. get_header(); ?>
  6.  
  7. <div id="content-wrap" class="container clr">
  8.  
  9. <?php wpex_hook_primary_before(); ?>
  10.  
  11. <div id="primary" class="content-area clr">
  12.  
  13. <?php wpex_hook_content_before(); ?>
  14.  
  15. <div id="content" class="site-content clr">
  16.  
  17. <?php wpex_hook_content_top(); ?>
  18.  
  19. <?php while ( have_posts() ) : the_post(); ?>
  20.  
  21. <?php wpex_get_template_part( 'page_single_blocks' ); ?>
  22.  
  23. <section class="vc_section padding_content normal">
  24. <div id="filters" class="vc_row wpb_row vc_row-fluid">
  25. <div class="wpb_column vc_column_container vc_col-sm-12">
  26.  
  27. <form action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST" id="filter">
  28. <?php
  29. if( $terms = get_terms( 'tag_names', 'orderby=name' ) ) :
  30.  
  31. echo '<div class="select_dropdown"><select name="names"><option>Filter op plantnaam</option>';
  32. foreach ( $terms as $term ) :
  33. echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
  34. endforeach;
  35. echo '</select></div>';
  36.  
  37. endif;
  38.  
  39. if( $terms = get_terms( 'tag_flower_colors', 'orderby=name' ) ) :
  40.  
  41. echo '<div class="select_dropdown"><select name="flower_colors"><option>Filter op bloemkleur</option>';
  42. foreach ( $terms as $term ) :
  43. echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
  44. endforeach;
  45. echo '</select></div>';
  46.  
  47. endif;
  48.  
  49. if( $terms = get_terms( 'tag_leaf_colors', 'orderby=name' ) ) :
  50.  
  51. echo '<div class="select_dropdown"><select name="leaf_colors"><option>Filter op bladkleur</option>';
  52. foreach ( $terms as $term ) :
  53. echo '<option value="' . $term->term_id . '">' . $term->name . '</option>';
  54. endforeach;
  55. echo '</select></div>';
  56.  
  57. endif;
  58. ?>
  59.  
  60. <button id="reset_btn">Reset filter</button>
  61. <input type="hidden" name="action" value="myfilter">
  62. </form>
  63. </div>
  64. </div>
  65.  
  66. <div class="vc_row wpb_row vc_row-fluid" id="results">
  67.  
  68. <?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(); ?>
  69. </div>
  70. </section>
  71.  
  72. <?php endwhile; ?>
  73.  
  74. <?php wpex_hook_content_bottom(); ?>
  75.  
  76. </div><!-- #content -->
  77.  
  78. <?php wpex_hook_content_after(); ?>
  79.  
  80. </div><!-- #primary -->
  81.  
  82. <?php wpex_hook_primary_after(); ?>
  83.  
  84. </div><!-- .container -->
  85.  
  86. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement