Support » Plugin: RPS Image Gallery » Add a single image to combined galleries?

  • Resolved rqdavis


    I have multiple galleries combined on one page, but I’d like to add just a single image from another gallery to the combined gallery. I tried adding “include” with the image ID, but when I do that, nothing shows up at all. Do you know if there’s a way to format the shortcode to allow for all the images of several galleries, plus just one image from another one?

    I tried editing the gallery to add an additional image, but I can’t seem to access my image library from the edit screen for some reason. Here’s the page:

    Here’s what I’m trying to accomplish: Thanks to your terrific plugin and the great updates you’ve made, I have all our current forthcoming books in one gallery, which is made up of multiple smaller galleries I’ve posted as new forthcoming books are released. Once the books included in a post are actually published, I remove the corresponding gallery ID from the combined gallery. Right now, the publication date of one of the titles included in an older post is not until June, but all other titles from that post have now already been published. I’d like to add that June title to the current list of all forthcoming titles so our users can see the complete list of what we have on order.

    Thanks in advance for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author redpixelstudios


    The functionality is somewhat present in the existing version if you are using WordPress 3.5. Let’s use the example where you have merged two galleries.

    [gallery id="1,63"]

    All you would need to do to add another image would be to edit the gallery and select the image that needs to be added. WordPress will automatically add another argument to the shortcode that includes all of the images in a single array like so:

    [gallery ids="4,12,11,10" id="1,63"]

    When the ids argument is present, the id argument is ignored. You can delete the ids argument to restore the default merged gallery behavior. Let us know if this addresses the issue or if there is some other solution you require.

    Thanks for your reply. It doesn’t seem to work as described. Here’s what the current gallery shortcode looks like:

    [gallery id="5113,5346,5476,5562,5651,5771,5857" size="medium" orderby="title"]

    The image id for the one image I’d like to add is “4841”

    If I’m understanding you correctly, the shortcode should be edited to look like this:

    [gallery=”4841″ id=”5113,5346,5476,5562,5651,5771,5857″ size=”medium” orderby=”title”]

    Is that correct? When I edit it as above, the new image (“4841”) does not appear in the gallery, although the original set of galleries are still merged correctly.

    BTW, I am using WordPress 3.5.1

    Plugin Author redpixelstudios


    Fortunately you don’t need to edit the shortcode manually. When you edit the gallery by adding another image using the WordPress Media interface, the shortcode gets modified automatically.

    Let’s use this example. Say you have two posts that have three attached images each. Post 1 has attachment 100, 101 and 102. Post 2 has attachment 103, 104, and 105. You merge them into a single gallery using the shortcode:

    [gallery id="1,2"]

    Then you decide that you want to add one image that is not attached to either post. Let’s assume this image has an id of 200. All you would need to do is edit the post and make sure that the content view was set to “Visual”, then click the “Edit Gallery” link on the gallery placeholder.

    When the Edit Gallery window appears, select “Add to Gallery” in the left sidebar. Then select the image(s) you want added to the gallery. Click the “Add to Gallery” button at the bottom-right of the window, then click “Update Gallery”.

    The next time you switch to “Text” mode when viewing the content, you will see the gallery shortcode has been transformed like so:

    [gallery ids="100,101,102,103,104,105,200" id="1,2"]

    Note that the “id” argument has no bearing on the gallery output when the “ids” argument is present. The beauty of this solution is that you could easily return to the original merged gallery by editing the shortcode and removing the “ids” argument.

    We hope that this clarifies the approach to the solution. Let us know if it does not.

    Plugin Author redpixelstudios


    Have you had a chance to test the presented solution? We were just wondering if this topic could be marked as resolved. Thanks in advance.

    Hi–sorry, I’ve been meaning to get back you on this for some time. I did try the solution you suggested, and the problem is that when I go to edit the gallery in the “visual” mode, and I try to add images to the gallery, none of the images in my media library are accessible–it appears that my media library is empty. I even tried uploading the image again from that point since I couldn’t get it from my library, but when I do that, every image in my entire media library gets added to the gallery as well. That’s why I tried just editing the short code, but again, that doesn’t produce the desired result either.

    Plugin Author redpixelstudios


    It seems like there may be an external factor at play here. We installed the theme you are using and ran through the above process without error. You could try troubleshooting by process of elimination to figure out which plugin (or combination of plugins) is causing the issue, or if you have access, enable debug mode to see what notices and warnings come up. That could provide some clue as to what is causing the problem without necessarily relying on the tedium of deactivating plugins.

    Plugin Author redpixelstudios


    We are going to go ahead and close this issue out since it has been some time since we have last dealt with it. Please feel free to reopen again should you wish to continue troubleshooting.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add a single image to combined galleries?’ is closed to new replies.