How to reset wp_query function when clicking on the heading output?

enter image description here

<?php $args = array( 'post_type' => 'post', 'meta_key' => 'post_price', 'meta_query' => array( 'key' => 'post_price', 'value' => '0', 'compare' => '>', 'type' => 'NUMERIC', ), 'order' => 'ASC', 'suppress_filters' => false, 'orderby' => 'meta_value_num', ); ?> <?php $query = new WP_Query( $args ); ?> <?php if ($query->have_posts()) { while ($query->have_posts()) {$query->the_post(); ?> <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> <div class="catalogSec-Item"> <div class="catalogSec-img"> <?php the_post_thumbnail( 'thambnail' ) ?> </div> <div class="catalogSec-descript"> <p class="catalogSec-descript__name"><?php echo get_short_title(36); ?></p> <!-- <p class="catalogSec-descript__functional"><?php // the_category( $separator = '/', ''); ?></p> --> <p class="catalogSec-descript__price"><?php the_field('post_price'); ?> Руб.</p> </div> <div class="catalogSec-descript-btn"> <a href="<?php the_permalink(); ?>" class="btn-blue catalogSec-descript__btn">Купить</a> </div> </div> </div> <?php } // конец while ?> <?php the_posts_pagination(); ?> <?php } wp_reset_query(); ?> 
  • What do you mean by "reset wp_query function"? Remove it from WordPress :)? And there is no such function, including in your code. Express your thought, please, so that you can be understood. - KAGG Design
  • In the function, I use a filter based on wp_query, but when I click on the rubric, no rubrics are displayed - user281117
  • How all this is connected with the given code and picture! - KAGG Design
  • the fact that when you hit the directory page, posts are displayed by the wp_query filter, but when you click on the left column, the filter does not behave as it should, but you must display the filter headings at a custom price - user281117
  • What is this filter? What is implemented? Where is his code? How is pressing the filter button connected in the above code? - KAGG Design

0