Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/11/2010, 15:31
CorpseOfSteel
 
Fecha de Ingreso: julio-2007
Ubicación: Málaga
Mensajes: 600
Antigüedad: 16 años, 9 meses
Puntos: 56
Mostrar imagen grande al hacer click en miniatura

Hola, veréis estoy haciendo una web donde se muestran varias miniaturas en el index, pero lo que no consigo hacer es que cuando haga click en una miniatura me abra esa misma imagen en grande. Este es el código que uso para las miniaturas:

Código PHP:
  <?php query_posts('cat=1'); ?>
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>   
    <?php
  $args 
= array(
  
'post_type' => 'attachment',
  
'post_mime_type' => 'image',
  
'numberposts' => -1,
  
'order' => 'ASC',
  
'post_status' => null,
  
'post_parent' => $post->ID
  
);
  
$attachments get_posts($args);
  if (
$attachments) {
        foreach (
$attachments as $attachment) {
            
$image wp_get_attachment_image_src$attachment->ID ); 
            
$miniatura'<img src="'.$image[0].'" width="'.$image[1].'" height="'.$image[2].'" alt="'.get_the_title().'" title="'.get_the_title().'" />';
            break;
         }
  }
  
?>
<a href="AQUI TENGO QUE SACAR LA IMAGEN EN GRANDE"><?php echo($miniatura); ?></a>

<?php endwhile; ?>
Llevo varios días intentándolo y no lo consigo, se que hay funciones que deberían sacar la imagen ampliada pero no lo consigo. Agradecería muchísimo alguna ayuda. Muchas gracias de antemano!!!