I am currently using the following xml to try and display a banner image at the top of the post view in the fishpig integration of magento and wordpress.

        <reference name="top.menu">
            <block type="wordpress/post_view" name="bannerslider" template="wordpress/post/banner.phtml">

how would I retrieve the url of the featured image in either the banner.phtml file or in the xml above so that I can display a dynamic featured image at the top of the wordpress post view page. Thanks

1 Answer 1


Try this in your banner.phtml file.

 <?php if ($featuredImage = $post->getFeaturedImage()): ?>
     <img src="<?php echo $featuredImage->getFullSizeImage() ?>"/>
 <?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.