Magento - Fishpig Wordpress - Featured image sizes -


i have installation of magento integrates wordpress using fishpig wordpress module.

as wp users know, when uploading image wordpress create resized versions referencing dimensions set in media settings (e.g. thumbnail size, medium size , large size). creates images each custom thumbnail size specify (e.g. via functions.php).

it appears though fishpig magento module uses thumbnail image size.

unfortunately need able display different sizes of same image (i.e. resized versions wordpress creates) on different pages. example, category page display small version, post view page display larger version.

i wondering if has had experience retrieving other resized images via module can't find documentation on (or if it's possible module couldn't see code suggest functionality).

greatly appreciate help.

i had same issue...i wanted create recent posts widget , fishpig has documented, didn't show example of how pull featured image post.

but found answer in: /app/design/frontend/base/default/template/wordpress/post/list/renderer/default.phtml:

<?php if ($featuredimage = $post->getfeaturedimage()): ?>             <div class="featured-image left">                 <a href="<?php echo $post->getpermalink() ?>" title="<?php echo $this->escapehtml($post->getposttitle()) ?>"><img src="<?php echo $featuredimage->getavailableimage() ?>" alt="<?php echo $this->escapehtml($post->getposttitle()) ?>"/></a>             </div> <?php endif; ?> 

you can change "getavailableimage" of these pull different images sizes wordpress produces:

getthumbnailimage() getmediumimage() getlargeimage() getfullsizeimage() getpostthumbnailimage() getavailableimage() getimagebytype($type = 'thumbnail') 

hope helps!


Comments

Post a Comment

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -