Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am showing the featured image on a custom post template, and I want to insert a "more images" text link to the gallery of attached images. Wordpress has instructions for inserting the gallery directly via but I want just the link, or better yet a modal popup to view the gallery.

I have tried a variety of plugins, but none seem to work out of the box with the featured image.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

There's no such thing as a link to a gallery, a post has a gallery by virtue of it having child attachment posts, it's not a separate entity.

You could achieve the modal window by using some sort of lightbox plugin and modifying the gallery shortcode to output the images as just anchor links with the same rel attribute and hide them with css. Obviously that's a bit of custom code, not sure if there's a plugin out there that already does this.

Alternately, you could create separate gallery posts and embed a gallery from another post with the gallery shortcode, then link to those gallery posts.

share|improve this answer
    
Thanks for clarifying how the gallery works. –  Drai Sep 7 '11 at 16:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.