2 of 2
deleted 12 characters in body
deflime
  • 888
  • 7
  • 9

Try 'category_name' => $category->slug instead of 'category_name' => $cat_name.

You are also missing wp_reset_postdata(); just after endwhile;.

deflime
  • 888
  • 7
  • 9