[wp-trac] [WordPress Trac] #17017: Check if a post has a featured image and get its URL (outside from the_loop)
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 1 23:21:18 UTC 2011
#17017: Check if a post has a featured image and get its URL (outside from
the_loop)
-----------------------------+-----------------------------
Reporter: wiltave | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Keywords:
-----------------------------+-----------------------------
I get posts with get_posts. I didn't find a way to check, outside of
the_loop, if a post has a featured image and how to get its URL (for
example, wp-content/uploads/month/featured-image.ext).
I've made two functions, please, take a look at the attachment. I've put
it in wp-includes/post.php. Maybe you could improve it (if it needs) and
include to the core.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17017>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list