title: foreach loop working but category_name not looping inside of Wp_Query :(
body: <p>I want to query category from post. Category is showing in output but <code>category_name</code> is not looping in <code>wp_query</code> array. How can i solve this?</p>
  
  <p>You can see my code below:</p>
  
  <pre><code>public function minzel_blog_cats() {
  $settings = $this-&gt;get_settings_for_display();
  $blog_cats = $settings['blog_category'];
  //if (!empty($blog_cats) &amp;&amp; !is_wp_error($blog_cats)) {
      foreach ($blog_cats as $blog_cat) {
          //$cat_options[$blog_cat-&gt;slug] = $blog_cat-&gt;slug;
          //$cat_options[$term-&gt;slug] = " '".$term-&gt;slug.", '";
          $cat_options = $blog_cat." , ";
          echo $blog_cat.", ";
      }
  //}
  
  return $cat_options;
  }
  
  $default    = [
      'posts_per_page'    =&gt; $blog_post_per,
      'orderby' =&gt; $blog_grid_orderby,
      'category_name' =&gt; " ' ".$this-&gt;minzel_blog_cats()." ', ",
      'order' =&gt; $blog_grid_order,
      'post_type'         =&gt; 'post',
  ];
  </code></pre>