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