Loading...

This is going to be a very quick recipy.

Two lines I always use in order to obtain the url for the featured image, full size. This could be useful if you want full control of the code, like placing the image as a background for a box, instead of relying on the img tag that the_post_thumbnail() outputs.

Here you are:

<?php
     // GET IMAGE LINK
     $thumbfull = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
     urlfull = $thumbfull['0']; 
?>

Now you can use $urlfull wherever you wish.

Author: Bea Cabrera

Freelance Filmmaker with a passion for big cities, snowboard, cinema and a weakness for the smell of freshly ground coffee. Engineer & Graphic Designer in a previous life, loving and living both: art and technology.  

Leave a Reply

Your email address will not be published.

You may use these <abbr title="HyperText Markup Language">html</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.