<?php
$termid = $_GET['termid'];
$args = array(
'posts_per_page' => 10,
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'post_type' => 'design'
);
if(is_numeric($termid)) {
if($termid == 0) {
$terms_id = wp_list_pluck(get_terms(array('taxonomy' => 'design')), 'term_id');
$args = array_merge($args, array(
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'design',
'field' => 'term_id',
'terms' => $terms_id
),
array(
'taxonomy' => 'new',
'field' => 'name',
'terms' => 'sale'