0

I'm using the technique below for that (getting all the post related with a taxonomy term), but for some reason if I have some posts with the term e and post with the term English I get them all and not only those which are related to English.

 'tax_query' => array(
      array(
            'taxonomy' => 'origin',
            'field'    => 'name',
            'terms'    => 'English',

     )
 )

Is there a way to get all the post related with the English term only? I'm not sure but right now seems to be working as a like operator.

0

Try this:

'tax_query' => array(
  'origin' => 'English'
)

Also, it should be pretty easy. Do some research.

  • That doesn't work, I took a look into the wordpress reference but I don't see a reference for that. – Luis Javier Sep 15 '16 at 14:42
  • this should work, use "english", instead of "English". – Deepak jha Sep 15 '16 at 14:49
  • Thanks, but I'm still getting the same results as the other way I was doing it. – Luis Javier Sep 15 '16 at 15:01
  • can you post whole taxonomy query you used? – Deepak jha Sep 15 '16 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.