Добился результата следующим образом:
<?php
/**
* Common Taxonomy - Used by property taxonomies
* Created by PhpStorm.
* User: waqasriaz
* Date: 08/01/16
* Time: 6:09 PM
*/
global $post, $taxonomy_title, $taxonomy_name, $listing_view;
$listing_view = houzez_option('taxonomy_posts_layout');
$what_to_show = get_post_meta( $post->ID, 'fave_properties_sort', true );
//<!--edited-->
$fave_featured_listing = get_post_meta( $post->ID, 'fave_featured_listing', true );
$fave_featured_prop_no = get_post_meta( $post->ID, 'fave_featured_prop_no', true );
$fave_prop_no = get_post_meta( $post->ID, 'fave_prop_no', true );
//<!--edited-->
if( $listing_view == 'grid-view-3-col' ) {
$listing_view_class = 'grid-view grid-view-3-col';
} else if( $listing_view == 'listing-style-3' ) {
$listing_view_class = 'grid-view';
} else if( $listing_view == 'listing-style-2-grid-view' ) {
$listing_view_class = 'grid-view listing-style-2-grid-view';
} else if( $listing_view == 'listing-style-2-grid-view-3-col' ) {
$listing_view_class = 'grid-view grid-view-3-col listing-style-2-grid-view';
} else if( $listing_view == 'listing-style-2' ) {
$listing_view_class = 'list-view listing-style-2';
} else {
$listing_view_class = $listing_view;
}
// Title
$current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
$taxonomy_title = $current_term->name;
$sticky_sidebar = houzez_option('sticky_sidebar');
$taxonomy_name = get_query_var( 'taxonomy' );
$taxonomy_layout = houzez_option('taxonomy_layout');
$taxonomy_num_posts = houzez_option('taxonomy_num_posts');
if( $taxonomy_layout == 'no-sidebar' ) {
$content_classes = 'col-lg-12 col-md-12 col-sm-12';
} else if( $taxonomy_layout == 'left-sidebar' ) {
$content_classes = 'col-lg-8 col-md-8 col-sm-12 col-xs-12 list-grid-area container-contentbar';
} else if( $taxonomy_layout == 'right-sidebar' ) {
$content_classes = 'col-lg-8 col-md-8 col-sm-12 col-xs-12 list-grid-area pull-left container-contentbar';
} else {
$content_classes = 'col-lg-8 col-md-8 col-sm-12 col-xs-12 list-grid-area container-contentbar';
}
$number_of_prop = $taxonomy_num_posts;
if(!$number_of_prop){
$number_of_prop = 9;
}
?>
<?php get_template_part('template-parts/properties-head'); ?>
<div class="row">
<div class="<?php echo esc_attr($content_classes); ?>">
<div id="content-area">
<!--start featured property items-->
<?php
if($what_to_show == 'x_featured_first' || $what_to_show == 'x_rand_featured_first') {
global $wp_query, $paged;
if ( is_front_page() ) {
$paged = (get_query_var('page')) ? get_query_var('page') : 1;
}
if( $fave_featured_listing != 'disable' ) {
$number_of_featured_prop = $fave_featured_prop_no;
if (!$number_of_featured_prop) {
$number_of_featured_prop = '4';
}
$prop_featured_args = array(
'post_type' => 'property',
'posts_per_page' => $number_of_featured_prop,
'paged' => $paged,
'post_status' => 'publish'
);
$prop_featured_args = apply_filters( 'houzez_featured_property_filter', $prop_featured_args );
$prop_featured_args = houzez_prop_sort($prop_featured_args);
$wp_query = new WP_Query($prop_featured_args);
if ($wp_query->have_posts()) : ?>
<div class="property-listing <?php echo esc_attr($listing_view); ?>">
<div class="row">
<?php
while ($wp_query->have_posts()) : $wp_query->the_post();
get_template_part('template-parts/property-for-listing');
endwhile;
?>
</div>
</div>
<hr>
<?php
endif;
wp_reset_query();
}
}
?>
<!--end featured property items-->
<!--start property items-->
<div class="property-listing <?php echo esc_attr($listing_view_class); ?>">
<div class="row">
<?php
global $wp_query;
$sort_args = array(
'posts_per_page' => $number_of_prop,
'tax_query' => array(
array(
'taxonomy' => 'property_status',
'field' => 'id',
'terms' => '228',
'paged' => $paged,
'operator' => 'NOT IN'
),
),
'order' => 'DESC',
'post_status' => 'publish'
);
$sort_args = houzez_prop_sort($sort_args);
$args = array_merge( $wp_query->query_vars, $sort_args );
query_posts( $args );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
if($listing_view == 'listing-style-3') {
get_template_part('template-parts/property-for-listing-v3');
} else if($listing_view == 'listing-style-2' || $listing_view == 'listing-style-2-grid-view' || $listing_view == 'listing-style-2-grid-view-3-col') {
get_template_part('template-parts/property-for-listing', 'v2');
} else {
get_template_part('template-parts/property-for-listing');
}
endwhile;
wp_reset_postdata();
else:
?>
<h4><?php esc_html_e('Sorry No Result Found', 'houzez') ?></h4>
<?php
endif;
?>
</div>
</div>
<!--end property items-->
<!--start property items-->
<div class="property-listing <?php echo esc_attr($listing_view_class); ?>">
<div class="row">
<?php
global $wp_query;
$sort_args = array(
'posts_per_page' => $number_of_prop,
'tax_query' => array(
array(
'taxonomy' => 'property_status',
'field' => 'id',
'paged' => $paged,
'terms' => '228'
),
),
'order' => 'DESC',
'post_status' => 'publish'
);
$sort_args = houzez_prop_sort($sort_args);
$args = array_merge( $wp_query->query_vars, $sort_args );
query_posts( $args );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
if($listing_view == 'listing-style-3') {
get_template_part('template-parts/property-for-listing-v3');
} else if($listing_view == 'listing-style-2' || $listing_view == 'listing-style-2-grid-view' || $listing_view == 'listing-style-2-grid-view-3-col') {
get_template_part('template-parts/property-for-listing', 'v2');
} else {
get_template_part('template-parts/property-for-listing');
}
endwhile;
wp_reset_postdata();
else:
?>
<h4><?php esc_html_e('Sorry No Result Found', 'houzez') ?></h4>
<?php
endif;
?>
</div>
</div>
<!--end property items-->
<hr>
<!--start Pagination-->
<?php houzez_pagination( $wp_query->max_num_pages, $range = 2 ); ?>
<!--start Pagination-->
</div>
</div><!-- end container-content -->
<?php if( $taxonomy_layout != 'no-sidebar' ) { ?>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 col-md-offset-0 col-sm-offset-3 container-sidebar <?php if( $sticky_sidebar['property_listings'] != 0 ){ echo 'houzez_sticky'; }?>">
<?php get_sidebar('property'); ?>
</div> <!-- end container-sidebar -->
<?php } ?>
</div>
Но, проблема в том, что я либо должен полностью исключить property_status с ID 228, либо у меня получается вывод внизу страницы, при втором проходе. Подскажите, есть ли возможность построить запрос так, чтобы все результаты с ID 228 просто отображались в конце всего списка (на последних страницах пагинации)?