title: Wordpress - Nested list of categories & subcategories
body: <p>Im trying to display a list of my wordpress categories with nested subcategories.
  So far i've only been able to get a list of parent categories or a list of subcategories excluding parents but I haven't been able to join the two together.</p>
  
  <p>This is the sort of result I am looking to create:</p>
  
  <ul>
  <li>Parent Category
  <ul>
  <li>Subcategory</li>
  <li>Subcategory</li>
  </ul></li>
  <li>Parent Category
  <ul>
  <li>Subcategory</li>
  </ul></li>
  <li>Parent Category
  <ul>
  <li>Subcategory</li>
  <li>Subcategory</li>
  <li>Subcategory</li>
  </ul></li>
  </ul>
  
  <p>EDIT:</p>
  
  <p>The idea for this is to create a custom category page. The HTML is as follows:</p>
  
  <pre><code>&lt;h1&gt;Categories&lt;/h1&gt;
  &lt;ul class="blocks"&gt;
      &lt;li&gt;
          &lt;img src="http://placehold.it/250x250" alt="title" /&gt;
          &lt;h2&gt;Parent Category&lt;/h2&gt;
          &lt;ul class="models"&gt;
              &lt;li&gt;&lt;a href="#"&gt;Sub Category&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Sub Category&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;img src="http://placehold.it/250x250" alt="title" /&gt;
          &lt;h2&gt;Parent Category&lt;/h2&gt;
          &lt;ul class="models"&gt;
              &lt;li&gt;&lt;a href="#"&gt;Sub Category&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Sub Category&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Sub Category&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>