title: Fishpig Wordpress Extension for Magento Category Hierarchy
body: <p>I'm working on a Magento site which is using the Fishpig Wordpress Extension.  We have the Categories widget displaying in the left sidebar &amp; it is set to show hierarchy.</p>
  
  <p><img src="https://i.stack.imgur.com/Qa6DB.jpg" alt="enter image description here"></p>
  
  <p>It is working two levels deep (i.e. ul &amp; li's with <code>.level0</code> &amp; <code>.level1</code>), but is not showing categories 3 levels deep i.e. <code>level2</code></p>
  
  <p>I've tested this on a basic wordpress installation and I can get it to display categories 3 levels down but I can't get it to work on Magento with the fishpig WordPress integration.  I have assigned posts to all the sub categories.</p>
  
  <p>I see in <code>template/wordpress/sidebar/widget/categories.phtml</code> that there is this code block to get the level1 child categories:</p>
  
  <pre><code>&lt;?php else: ?&gt;
          &lt;?php foreach($categories as $category): ?&gt;
              &lt;li class="level0 item&lt;?php if ($this-&gt;isCurrentCategory($category)): ?&gt; active&lt;?php endif; ?&gt;"&gt;
                  &lt;a  class="level0" href="&lt;?php echo $category-&gt;getUrl() ?&gt;" title="&lt;?php echo $category-&gt;getName() ?&gt;"&gt;
                      &lt;?php echo $category-&gt;getName() ?&gt;
                  &lt;/a&gt;&lt;?php if ($this-&gt;getCount()): ?&gt; (&lt;?php echo $category-&gt;getPostCount() ?&gt;)&lt;?php endif; ?&gt;
                  &lt;?php if ($this-&gt;getHierarchical()): ?&gt;
                      &lt;?php $children = $children = $category-&gt;getChildrenCategories() ?&gt;
                      &lt;?php if (count($children) &gt; 0): ?&gt;
                          &lt;ul class="level1"&gt;
                              &lt;?php foreach($children as $child): ?&gt;
                                  &lt;?php if ($child-&gt;getPostCount() &gt; 0): ?&gt;
                                  &lt;li class="level1 item&lt;?php if ($this-&gt;isCurrentCategory($child)): ?&gt; active&lt;?php endif; ?&gt;"&gt;
                                      &amp;raquo; &lt;a href="&lt;?php echo $child-&gt;getUrl() ?&gt;" title="&lt;?php echo $child-&gt;getName() ?&gt;" class="level1"&gt;&lt;?php echo $child-&gt;getName() ?&gt;&lt;/a&gt;&lt;?php if ($this-&gt;getCount()): ?&gt; (&lt;?php echo $child-&gt;getPostCount() ?&gt;)&lt;?php endif; ?&gt;
                                  &lt;/li&gt;
                                  &lt;?php endif; ?&gt;
                              &lt;?php endforeach; ?&gt;
                          &lt;/ul&gt;
                      &lt;?php endif; ?&gt;
                  &lt;?php endif; ?&gt;
              &lt;/li&gt;
          &lt;?php endforeach; ?&gt;
      &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>Is there a way to display more than two levels of wordpress categories on Magento with Fishpig?</p>