Thread: PHP question
View Single Post
Old 07-01-2013, 09:19 PM  
BSleazy
Confirmed User
 
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 6,721
Quote:
Originally Posted by Colmike7 View Post
This should get the URL of only the featured image:

<?php if (has_post_thumbnail( $post->ID ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<stuff><img src='<?php echo $image[0]; ?>'/></stuff>

<?php endif; ?>

Edit: Might not be what you're looking for. Look at the reply above.
Ya I know how to do all that but this is different. It's part of a function and I need to get all of the featured images from the media library. Displaying them individually isn't a problem.
__________________
icq 156131086
BSleazy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote