1
2
3
4
5
6
7
//you have to change this code:

<a rel="prettyPhoto[group]" class="single_image<?php echo($class); ?>" href="<?php echo($preview); ?>"></a>

//to be like this:

<a href="<?php the_permalink(); ?>"></a>