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 trying to find a solution to a problem that Wordpress seems to lack.

Here is a scenario:

I have uploaded images to a post using the native gallery to display the images. These images then appear under the gallery tab within the upload/insert and they will appear on the post. Works perfectly.

Further down the line I create a new post, I want to include images from my Media Library into the gallery without re-uploading the same images again.

I expected to find, "Insert into gallery", next to "Insert into post", but there doesn't seem to be a way of doing this.

Is there a solution to this? I have done a lot of theme development in the past, but amazed at there isn't a simple solution to this problem.

I would be grateful for any help.

share|improve this question
up vote 0 down vote accepted

Attachments are a type of post, and a post can only have a single parent, that's why it's not natively possible to have an attachment associated with multiple posts- there is no mechanism for many-to-many associations. There are several ways to solve this, but how simple it is depends on your skill level or willingness to depend on plugins.

For plugins, there's File Gallery, and Advanced Custom Fields, probably others. Otherwise a couple of custom solutions would be to use post meta data to store references to attachments for a post, and/or a taxonomy to "tag" images for each unique gallery you want them associated with along with some meta data for ordering them.

Here is a thread on WordPress Hackers with an explanation from the lead developer and some possible solutions.

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.