title: Wordpress - Query categories list with advanced custom field argument
body: <p>I use the Advanced Custom Fields plugin which is great to add additional fields to posts or categories but i can't find a solution to add an argument to the get_categories function.</p>
  
  <p>I want to display a list of categories which are child_of=X and a specific custom field must be equal to Y but my code display all of the childs...</p>
  
  <pre><code>foreach(get_categories('child_of=4') as $category) {
  // Get the icon in a variable
  $my_icon = get_cat_icon('echo=false&amp;cat='.$category-&gt;cat_ID);
  // Display a list with icons and the category names
  $value = get_field('ligue');
  // Get value of ligue
      if ($value == 1) {
  echo '&lt;div class="contentmenupage"&gt;&lt;a href="'.get_category_link($category-&gt;cat_ID).'"&gt;'.$my_icon.'&lt;/a&gt;&lt;br&gt; &lt;a href="'.get_category_link($category-&gt;cat_ID).'" title="'.$category-&gt;description.'"&gt;'.$category-&gt;cat_name.'&lt;/a&gt;&lt;p&gt;'.get_field('fondation', 'category_' . $category-&gt;cat_ID ).'&lt;br&gt;'.get_field('stade', 'category_' . $category-&gt;cat_ID ).'&lt;br&gt;'.get_field('couleurs', 'category_' . $category-&gt;cat_ID ).'&lt;p&gt;&lt;/div&gt;';
  }
  }
  </code></pre>
  
  <p>Thank you very much for your help!</p>