<div class="title title-archive clearfix"><?php // Display current term echo apply_filters('wpsight_taxonomy_title', wpsight_listing_loop_title()); // Action hook to add content to title do_action('wpsight_loop_title_actions'); // Display term description $term_description = term_description(); if (!empty($term_description)) { echo '<div class="category-description clearfix">' . wpsight_format_content($term_description) . '</div>'; } ?> </div><!-- .title --><?php // Action hook to add content after archive title do_action('wpsight_listing_archive_title_after', wpsight_listing_taxonomy_query_args(), $content_class); ?> <?php if (have_posts()) { ?> <div class="row"> <?php // Create loop counter $counter = 0; while (have_posts()) { // Increase loop counter $counter++; the_post();
function wpsight_listing_taxonomy_query($query) { if (is_tax() && !is_search() && $query->is_main_query() && !is_admin()) { // Get listing search query $args = wpsight_listing_taxonomy_query_args(); // Add more parameters foreach ($_GET as $key => $value) { if ($key == 'type') { $key = 'property-type'; } $args[$key] = $value; } // print_r($args); die(); foreach ($args as $k => $v) { $query->set($k, $v); } } return $query; }