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 have [gallery] inside the post, and I'm interested in a way to add already existing images from media library in to this gallery? once I trying add any image I have only one option - insert into post.

Thanks in advance, Dmitry

share|improve this question
up vote 3 down vote accepted

By default, you can't. Galleries are tied to posts, and only to posts.


  1. Insert the gallery from any arbitrary post, via [gallery id="123"] where 123 is the ID of the post.
  2. Create a custom filter for the gallery filter hook, whereby you query/include the images that you want, perhaps by some post custom metadata (that you would also have to create)
  3. Insert images individually, rather than as a gallery
  4. Duplicate the images by uploading/attaching them also to the new post, so that they can be output via [gallery]
share|improve this answer

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.