Gallery Link From Thumbnail To Fullsize Image
-
Hello,
I’m trying to have a gallery with thumbnails that link to the full size image in a post, so that when clicked the gallery thumbnail will open a lightbox with the full image. So far, I’ve tried using wp_get_attachment_link() and the_attachment_link(), which I thought should have done the trick. But it only resulted in a “missing attachment” message.
Here is the loop I have so far:
<ul id="portfolio-list"> <?php query_posts('cat=5&showposts='); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li class="<?php $category = get_the_category(); echo $category[0]->cat_name; ?> all"> <a href="<?php the_attachment_link(); ?>"> <?php the_post_thumbnail(); ?> <h3><?php the_title(); ?>.</h3> <p><strong>tags:</strong> <?php $category = get_the_category(); echo $category[0]->cat_name; ?></p> </a> </li> <?php endwhile; ?> <?php endif; ?> </ul><!-- /#portfolio-list -->
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Gallery Link From Thumbnail To Fullsize Image’ is closed to new replies.