deleted 12 characters in body
Source Link
deflime
  • 848
  • 7
  • 9

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

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

Try $cat_name = $category->slug instead of $cat_name = $category->name.

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

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

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

Source Link
deflime
  • 848
  • 7
  • 9

Try $cat_name = $category->slug instead of $cat_name = $category->name.

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