How do i add the light box function
rel=”lightbox”
to the code below
<a href="<?php echo wp_get_attachment_url($post->ID); ?>" title="<?php echo wp_specialchars( get_the_title($post->ID), 1 ) ?>"><?php echo wp_get_attachment_image($post->ID, 'large' ); ?></a>
i think most lightbox plugins require the rel or class attribute to be on the link, so:
@helgatheviking’s solution is the correct one. If it doesn’t work, then something else is wrong (e.g. is the lightbox script properly enqueued, etc.)
Alternatively, you can use this plugin: http://wordpress.org/extend/plugins/jquery-lightbox-balupton-edition/.
Or one of the few others in the WordPress plugin repository: http://wordpress.org/extend/plugins/tags/lightbox.