title: get_categories child_of empty array in WordPress
body: <p>I'm attempting to generate a list of categories based on a particular ID in WordPress. The ID is static so here is my code.</p>
  
  <pre><code>&lt;?php $categories =  get_categories('child_of=17'); 
   print_r($categories);      ?&gt;
  </code></pre>
  
  <p>This just prints out <code>array()</code></p>
  
  <p>I have made sure that the correct ID is 17, and that there are categories whose parent is the category with ID 17. I'm just wondering does the location of this code matter?</p>
  
  <p>I have it in my own custom sidebar.php file called sidebar-blog.php.</p>