Al pinchar sobre la imagen la linkea a la misma imagen y no se abre con efecto del plugin de Ligtbox que tengo implementado...
Echarle un vistazo a ver si algo he hecho mal o si hubiera algun error,
Un saludo y gracias de antemano...
Cita:
<?php
$args = array(
'post_type' => 'attachment',
'numberposts' => 1,
'order' => 'ASC',
'post_parent' => $post->ID,
'post_mime_type' => 'image'
);
$attachments = get_children($args);
if ($attachments) {
foreach ($attachments as $attachment) {
//Tamaños: "thumbnail", "medium", "large", "full"
$image_atts = wp_get_attachment_image_src( $attachment->ID, 'medium' );
$attachment_full_url = wp_get_attachment_url($attachment->ID); ?>
<a href="<?php echo $attachment_full_url; ?>">
<img src="<?php echo $image_atts[0]; ?>" alt="" width="<?php echo $image_atts[1]; ?>" height="<?php echo $image_atts[2]; ?>" />
</a>
<?php
}
}
?>
$args = array(
'post_type' => 'attachment',
'numberposts' => 1,
'order' => 'ASC',
'post_parent' => $post->ID,
'post_mime_type' => 'image'
);
$attachments = get_children($args);
if ($attachments) {
foreach ($attachments as $attachment) {
//Tamaños: "thumbnail", "medium", "large", "full"
$image_atts = wp_get_attachment_image_src( $attachment->ID, 'medium' );
$attachment_full_url = wp_get_attachment_url($attachment->ID); ?>
<a href="<?php echo $attachment_full_url; ?>">
<img src="<?php echo $image_atts[0]; ?>" alt="" width="<?php echo $image_atts[1]; ?>" height="<?php echo $image_atts[2]; ?>" />
</a>
<?php
}
}
?>