How to reset wp_query function when clicking on the heading output?
<?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(); ?> 