• Can anyone tell me why, since upgrade to 2.7, does this code no longer work??

    <?php
    	$files = get_children("post_parent=$id&post_type=attachment&post_mime_type=image");
    	if($files){
    	        $keys = array_keys($files);
    	        $num=$keys[0];
    	        $theimage=wp_get_attachment_image($num,$size='thumbnail',$icon=false);
    			$thepostlink = get_permalink();
    	        echo "<a href=\"$thepostlink\">$theimage</a>";
    	}
     ?>

    The code will only ever return a full size image for uploads that happened before the upgrade. All uploads that have occured since work perfectly!!

    It’s driving me so mad, that I’m considering no longer using wordpress!

    Help me?

Viewing 1 replies (of 1 total)
  • Maybe because WP 2.7 names thumbs differently? I don’t know.

    Anyway, you could shrink the full images with CSS, as a workaround.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_attachment_image() not working’ is closed to new replies.