title: Loading sidebar blocks based on post type
body: <p>I'm using the Fishpig WordPress extension for Magento (with the CPT extension) and I can't seem to figure out how to load sidebar blocks based on the type of the current post. I want to load a particular block only if:</p>
  
  <ul>
  <li>I'm viewing a single post with the type <code>recipe</code></li>
  <li>I'm viewing the archive for the type <code>recipe</code></li>
  <li>I'm viewing the term page for the custom taxonomy <code>recipe_category</code></li>
  </ul>
  
  <p>For the single post view, I added the block in my local.xml like this:</p>
  
  <pre><code>&lt;wordpress_post_view&gt;
      &lt;reference name="right"&gt;
          &lt;remove name="wordpress.widget.categories" /&gt;
          &lt;block type="wordpress/sidebar_widget_categories" name="wordpress.widget.recipe_categories" before="-" as="recipe_categories" template="wordpress/sidebar/widget/categories.phtml"&gt;
              &lt;action method="setTitle"&gt;&lt;title&gt;Recipe Categories&lt;/title&gt;&lt;/action&gt;
              &lt;action method="setTaxonomy"&gt;&lt;title&gt;recipe_category&lt;/title&gt;&lt;/action&gt;
          &lt;/block&gt;
      &lt;/reference&gt;
  &lt;/wordpress_post_view&gt;
  </code></pre>
  
  <p>That's working fine, I just need to figure out how to restrict it to display only for the <code>recipe</code> post type. Same goes for the <code>recipe</code> archive and the <code>recipe_category</code> taxonomy term archive.</p>