WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.