[wp-hackers] Extract first image from a post
alan at verselogic.net
Sun Nov 23 03:01:02 GMT 2008
Why not get the first image attachment instead? Less parsing of HTML.
Sent from my iPhone
On 22-Nov-08, at 19:34, "Alex Hempton-Smith"
<hempsworth at googlemail.com> wrote:
> Hi all,
> I've created a custom loop to return the last 4 posts, and I need to
> 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
> I'm not really a PHP guru but I'm very eager to learn!
> Many thanks,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers