Is there a theme function (or WordPress function) that will let me get the URL of the (first) featured image associated with the post, when I am in the single post view?
Yes – you can use following code to get the first featured image – if you replace  with  you’ll get the second and so on:
$slides = avia_post_meta($post->post_id, 'slideshow');
$postimage = avia_image_by_id($slides['slideshow_image'],'thumbnail',$output = 'url');
You can replace “thumbnail” with another image size too…
The code you gave me displays the image. I don’t want to display it, I just want the URL.
Thank you :)
How do I set the size of the thumbnail in the theme/Wordpress settings?
You can change the slideshow/image dimensions in functions.php (I’d only adjust the height value). Afterwards regenerate the thumbnails with: http://wordpress.org/extend/plugins/regenerate-thumbnails/
The topic ‘Retrieving URL of featured image for a post, in single post view?’ is closed to new replies.