Loop in taxonomy for terms and post

There are a few things wrong:

  1. In your code you are using the same $args array in the WP_Query call that you used in your get_terms call. Perhaps you meant to use $postargs in the WP_Query call?

  2. @Milo is correct…you should be using posts_per_page, not number.

  3. Your tax_query array element ‘field’ says ‘name’ but you pass it the term slug and not the term name.

Hopefully this helps: Here is the reference