I'm trying to get the featured image from a wordpress page to display outside of the fishpig template. My site uses banners from Magento for product/category pages, but I also wish to use the same banner area for WordPress featured images if possible.
So for example, if I go to a page created in wordpress and that page has a featured image defined, I'd want that to display in the block which I use for Magento banners.
<?php if ($featuredImage = $post->getFeaturedImage()): ?> <a href="<?php echo $post->getPermalink() ?>"> <img src="<?php echo $featuredImage->getAvailableImage() ?>" alt="<?php echo $this->escapeHtml($post->getPostTitle()) ?>"/> </a>
...in my banner phtml block, but obviously it needs $post to be defined to work.
To do that I've added (based on some other documentation):
<?php $post = Mage::getResourceModel('wordpress/post')->load(); ?>
But again, I'd need an ID in there and I don't really know how to get that either.
So what I'm really asking is how do I get the ID of the current page/post? If I can't get that, is there a way of getting the featured image to display somehow?
Hopefully I'm not being too numb here! Tom