1

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.

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

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

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, privacy policy and cookie policy

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