Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2693

    Hi,

    I need to get the URL to the post image.

    Assume this can be done with $big_prev_image = kriesi_post_thumb( somthing), but how?

    Thanks

    #38940

    Hey,

    The kriesi_post_thumb function calls the image URL and includes it as part of the output. What you’re looking for is this code:

    $image_id = get_post_thumbnail_id();
    $image_url = wp_get_attachment_image_src($image_id, NULL);
    $image_url = $image_url[0];

    You could then echo the $image_url to print the link on the page.

    Hope this helps.

    James

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to get URL to post image?’ is closed to new replies.