[wp-hackers] Extract first image from a post

Alex Hempton-Smith hempsworth at googlemail.com
Sun Nov 23 00:34:23 GMT 2008

Hi all,
I've created a custom loop to return the last 4 posts, and I need to extract
the first image from each post. Is there a way of possibly searching
the_content for an image and outputting the first one the search finds?

I'm not really a PHP guru but I'm very eager to learn!

Many thanks,

More information about the wp-hackers mailing list