Hi, I would like to know if it is possible to call only an image present in post content without the text.
Example, if I would like to display a short list of featured post, with simply a thumb image and the title. The thumb image will be a thumb of the first image in the post.
This is similar to
// Display CONTENT (teaser only):
$Item->content_teaser( array(
'before' => '',
'after' => '',
'disppage' => 1,
'stripteaser' => false,
) );
but only showing the first image without the content teaser. i.o.w. without text.
How can I do this?
Thanks.
If the image is attached to the post try this. I assume you already have an $Item object
Otherwise you'll have to parse post content and extract <img> tag