2009-11-29 26 views

回答

14

在你的single.php模板試試這個:

$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; 
+1

非常感謝您的支持。 – fatihturan 2009-11-29 12:03:01

+0

我開始認識到,沒有爲這個沒有漂亮的解決方案。 – ViniciusPires 2013-06-25 20:07:52