fork download
  1. <?php
  2.  
  3. get_header();
  4. GLOBAL $webnus_options;
  5. ?>
  6. <section id="headline">
  7. <div class="container">
  8. <?
  9. $parent_taxonomy = wp_get_term_taxonomy_parent_id(get_queried_object()->term_id, 'catalog_category');
  10. if($parent_taxonomy) {
  11. $parent_taxonomy = get_term($parent_taxonomy, 'catalog_category');
  12. echo '<h3>'.$parent_taxonomy->name.' ';
  13. echo single_cat_title( $prefix = '', $display = 0 );
  14. echo '</h3>';
  15.  
  16. }
  17. else {
  18. ?>
  19. <h3><?php single_cat_title( $prefix = '', $display = true ); } ?></h3>
  20. </div>
  21. </section>
  22.  
  23.  
  24. <section class="container" >
  25. <hr class="vertical-space2">
  26. <?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
  27. <?php
  28. if( 'left' == $webnus_options->webnus_blog_sidebar() || 'both' == $webnus_options->webnus_blog_sidebar() ):
  29. get_sidebar('bleft');
  30. endif;
  31. ?>
  32. <?
  33. $builder = array('Tatprof', 'Schuco');
  34. $count = array(8, 16, 24);
  35. $category = array(44, 41, 45, 47, 48, 46)
  36. ?>
  37. <!-- begin-main-content -->
  38. <section class="col-md-12 omega catalog-list">
  39. <div class="sort">
  40. <form action="" method="GET">
  41. <label><span>Категория:</span>
  42. <select id="category">
  43. <?
  44. foreach($category as $var) {
  45. $term = get_term( $var, 'catalog_category' );
  46. if($term->name != '') {
  47. if(get_queried_object_id()==$var)
  48. echo '<option value="http://b...content-available-to-author-only...m.ru/catalog/'.$term->slug.'" selected>'.$term->name.'</option>';
  49. else
  50. echo '<option value="http://b...content-available-to-author-only...m.ru/catalog/'.$term->slug.'">'.$term->name.'</option>';
  51. }
  52. }
  53. ?>
  54. </select>
  55. </label>
  56. <label class="builder"><span>Производитель:</span>
  57. <select name="builder">
  58. <option value="">Все</option>
  59. <?
  60. foreach($builder as $var) {
  61. if($_GET['builder']==$var)
  62. echo '<option value="'.$var.'" selected>'.$var.'</option>';
  63. else
  64. echo '<option value="'.$var.'">'.$var.'</option>';
  65. }
  66. ?>
  67. </select>
  68. </label>
  69. <label><span>Кол-во товаров:</span>
  70. <select name="count">
  71. <?
  72. if(isset($_GET['count']))
  73. $count_n=$_GET['count'];
  74. else
  75. $count_n='8';
  76. foreach($count as $var) {
  77. if($count_n==$var)
  78. echo '<option value="'.$var.'" selected>'.$var.'</option>';
  79. else
  80. echo '<option value="'.$var.'">'.$var.'</option>';
  81. }
  82. ?>
  83. </select>
  84. </label>
  85. </form>
  86. </div>
  87. <?
  88. if(isset($_GET['builder']))
  89. $builder=$_GET['builder'];
  90. else
  91. $builder='';
  92. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  93. $query = new WP_Query(
  94. 'post_type' => 'catalog',
  95. 'meta_key' => 'builder',
  96. 'meta_value' => $builder,
  97. 'posts_per_page' => $count_n,
  98. 'paged'=>$paged,
  99. 'tax_query' => array(
  100. 'taxonomy' => 'catalog_category',
  101. 'field' => 'id',
  102. 'terms' => array( get_queried_object_id() ),
  103. )
  104. )
  105. )
  106. );
  107. while ( $query->have_posts() ) {
  108. $query->the_post();
  109. ?>
  110. <div class="item">
  111. <div class="img">
  112. <a href="<?php echo get_permalink(); ?>"><?php echo get_the_post_thumbnail( $query->ID, array(270, 270)); ?></a>
  113. </div>
  114. <div class="params">
  115. <ul>
  116. <?
  117. if(get_field('teplo'))
  118. echo '<li><img src="http://t...content-available-to-author-only...f.ru/upload/params/7e5d89d65891a587c849b8d0e1d7358c.png" title="'.strip_tags(get_field('teplo')).'"></li>';
  119. if(get_field('furnitura'))
  120. echo '<li><img src="http://t...content-available-to-author-only...f.ru/upload/params/8740a65f9c5a38f75b2a419698e91bd4.png" title="'.strip_tags(get_field('furnitura')).'"></li>';
  121. if(get_field('protection')) {
  122. $protect=strip_tags(get_field('protection'));
  123. $protect=explode("\n", $protect);
  124. foreach ($protect as $var)
  125. echo '<li><img src="http://t...content-available-to-author-only...f.ru/upload/params/f238dacf9a4947a3d60a44817a80aa26.png" title="'.$var.'"></li>';
  126. }
  127. ?>
  128. </ul>
  129. </div>
  130. <div class="builder"><?php the_field('builder'); ?></div>
  131. <div class="title"><a href="<?php echo get_permalink(); ?>"><? the_title(); ?></a></div>
  132. <div class="description"><?php the_field('anons'); ?></div>
  133. </div>
  134. <?php }
  135.  
  136. ?>
  137. <br class="clear">
  138.  
  139. <?php
  140. if(function_exists('wp_pagenavi'))
  141. {
  142. wp_pagenavi( array( 'query' => $query ) );
  143. }
  144. next_posts_link('&laquo; Older Entries');
  145. previous_posts_link('Newer Entries &raquo;') ;
  146. wp_reset_postdata();
  147. ?>
  148. <div class="white-space"></div>
  149. </section>
  150. <!-- end-main-content -->
  151. <?php
  152. if( 'right' == $webnus_options->webnus_blog_sidebar() || 'both' == $webnus_options->webnus_blog_sidebar() ):
  153. get_sidebar('bright');
  154. endif;
  155. ?>
  156. <br class="clear">
  157. </section>
  158. </section>
  159. <?php
  160. get_footer();
  161. ?>
Runtime error #stdin #stdout #stderr 0.01s 20568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Call to undefined function get_header() in /home/cUfmVJ/prog.php on line 3