title: How can you get the post category on single.php
body: <p>How can you get the post category on single.php? </p>
  
  <p>I've tried:</p>
  
  <pre><code>&lt;h1&gt;&lt;?php echo $this-&gt;escapeHtml($post-&gt;get_the_category()) ?&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>   &lt;?php echo $this-&gt;escapeHtml($post-&gt;get_category_parents( $cat, true, ' &amp;raquo; ' )) ?&gt;
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>&lt;h1&gt;&lt;?php echo $this-&gt;escapeHtml($post-&gt;get_the_category($post-&gt;ID)) ?&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>This is the entire file:</p>
  
  <pre><code>&lt;?php $post = $this-&gt;getPost() ?&gt;
  &lt;?php if ($post): ?&gt;
      &lt;?php $helper = $this-&gt;helper('wordpress') ?&gt;
      &lt;?php $author = $post-&gt;getAuthor() ?&gt;
  
  
      &lt;div class="page-title post-title"&gt;
          &lt;h1&gt;&lt;?php echo $this-&gt;escapeHtml($post-&gt;get_the_category($post-&gt;ID)) ?&gt;&lt;/h1&gt;
          &lt;h1&gt;&lt;?php echo $this-&gt;escapeHtml($post-&gt;getPostTitle()) ?&gt;&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div class="post-view"&gt;
          &lt;p class="post-date when"&gt;&lt;?php echo stripslashes($this-&gt;__('&lt;span class=\"by-author\"&gt; by %s&lt;/span&gt; on %s.', $post-&gt;getAuthor()-&gt;getDisplayName(), $post-&gt;getPostDate())) ?&gt;&lt;/p&gt;
          &lt;?php echo $this-&gt;getBeforePostContentHtml() ?&gt;
          &lt;div class="post-entry entry std&lt;?php if ($post-&gt;getFeaturedImage()): ?&gt; post-entry-with-image&lt;?php endif; ?&gt;"&gt;
              &lt;?php if ($post-&gt;isViewableForVisitor()): ?&gt;
  &lt;!--                --&gt;&lt;?php //if ($featuredImage = $post-&gt;getFeaturedImage()): ?&gt;
  &lt;!--                    &lt;div class="featured-image left"&gt;&lt;img src="--&gt;&lt;?php //echo $featuredImage-&gt;getAvailableImage() ?&gt;&lt;!--" alt="--&gt;&lt;?php //echo $this-&gt;escapeHtml($post-&gt;getPostTitle()) ?&gt;&lt;!--"/&gt;&lt;/div&gt;--&gt;
  &lt;!--                --&gt;&lt;?php //endif; ?&gt;
                  &lt;?php echo $post-&gt;getPostContent() ?&gt;
              &lt;?php else: ?&gt;
                  &lt;?php echo $this-&gt;getPasswordProtectHtml() ?&gt;
              &lt;?php endif; ?&gt;
          &lt;/div&gt;
          &lt;?php echo $this-&gt;getAfterPostContentHtml() ?&gt;
          &lt;?php echo $this-&gt;getCommentsHtml() ?&gt;
      &lt;/div&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>I'm working on WordPress through the Fishpig WordPress integration for Magento so the file path is template/wordpress/post/view.phtml.</p>