Upgrade to 2.8.2 broke the site. What shall I do.
<?php
$size = 'large';
if ($images = get_children(array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID,)))
foreach($images as $image) {
$attachment=wp_get_attachment_image_src($image->ID, $size);
?>
<img src="<?php echo $attachment[0]; ?>" alt="" class="full"/>
<?php } ?>
I tested that code block in a local 2.8.2 install and it worked. What lead you to that particular code block? Are you seeing any error messages? What exactly is broken? Do you have a link to the theme that people can download and test?
Yeah, the code seems perfect, but my client had messed the site. I used another approach that worked, but that code works too. Thanks for confirming though.