• Skip to primary navigation
  • Skip to main content

Genesis Community

Resources for Genesis WordPress Theme Users

  • Facebook
  • Twitter
  • Slack
  • Wiki
  • Login
You are here: Home / Wikis / WordPress / URL of Featured image

URL of Featured image

esc_url( wp_get_attachment_url( get_post_thumbnail_id() ) )

A particular size:

$image_url = wp_get_attachment_image_url( get_post_thumbnail_id(), 'large' );

or,

wp_get_attachment_image_url( get_post_thumbnail_id( $prev_post->ID ), 'prev_next_thumb' )

or,

wp_get_attachment_image_src( get_post_thumbnail_id(), 'landing-page' )[0]

Posted by: Sridhar Katakam Category: WordPress Tags: featured image

« Comma-separated list of unlinked tags w/o a trailing comma
Fix for WordPress 3.0 “paged” bug »

Copyright © 2026 · Genesis Sample on Genesis Framework · WordPress · Log in