How can one picture belongs different galleries?

For example, there are two galleries. I want to avoid loading the image twice (in two galleries) but it shown (included) in the first and second gallery.


This is not possible in NextGen gallery.

You have to upload the image into each folder, as NextGen gallery works with file structures, not with database entries for retrieving the images.

| improve this answer | |

You can use the include attribute of the [gallery] shortcode to include the images in your galleries. For example, if you have an image with ID of 6 and you want to include it in two different galleries and in different posts, in the first post you can put:

[gallery include="1,2,31,6"]

This include images with IDs: 1, 2 31, and 6. And on the second post:

[gallery include="7,12,35,6"]

This include images 7, 12, 45 and 6.

As of WP 3.5, the ids attribute is included by default in the gallery shortcode, which give you much flexibility in choosing and manipulating images in your galleries, read more in the codex page.

| improve this answer | |
  • This should work fine for WordPress Galleries, @Ahmad M, but for the NextGen Gallery this is not usable. – fischi Dec 27 '12 at 11:48
  • @fischi Thanks, it was not clear on the question, just now I saw the <plugin-nextgen-gallery> tag. – Ahmad M Dec 27 '12 at 12:22

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.