0

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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