views:

160

answers:

3

Hello.

How i can show attached images of my posts on Wordpress?

+1  A: 

wp_get_attachment_image

Soufiane Hassou
+2  A: 

Try this in your single.php template:

$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_parent' => $post->ID
);
$images = get_posts( $args );
foreach($images as $image):
echo wp_get_attachment_image($image->ID, 'medium');
endforeach;
Adam Dempsey
Thanks a lot for your support.
fatihturan
A: 

If you can wait please wiat for wordpress 2.9 It will support this feature

Mayah
I know but i can't wait.
fatihturan