Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using wp-query for filtering results on the basis of tax_query.

e.g.

           $args = array(
                'post_type' => 'product',
                'relation' => 'AND',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'Micromax',
                        'field' => 'slug',
                        'terms' => array('micromax','canvas')
                    )
                )
            );

In (micromax,canvas) 1 is child of any 2nd term.I need that if there is parent in term then it skip the parent term and show results only on basis of children (i.e result of only 1 term). Similarly if ,

terms = 'micromax','canvas','ninja' and out of three there are 2 child then result should come from only 2 children terms.

Hope you got my point.

Thanks!!!

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.