In a post can I have single photos and a gallery NOT including those photos?

  • Unknown's avatar

    Hello, I need help about uploading photos and a gallery of images in the same post. More exactly, I’d like to create posts where I can insert a couple of photos at a full size AND a gallery of other images NOT including the pictures inserted as single images. I’ve realized that, if I upload (for example) ten photos in the media window and I want to use only two images as single pictures and the other eight pics as parts of a gallery, it’s impossibile because, inserting the gallery, it involves all the ten photos, even tough already inserted as single images. In other words, do you know how can I choose which photos already uploaded the gallery must show? Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    1. Upload multiple images from your computer
    2. Add them into the post via ‘insert gallery’
    3. Add exclude=”xx,xy” in the gallery as [gallery exclude="xx,xy"]
    where xx and xy are the id’s of images to be separated from gallery.
    Where to get the image attachment id?
    To get an attachment ID for an image, go to your Media Library and hover over the image title you want to exclude. You can find the ID in the URL (the number after attachment_id=).

  • Unknown's avatar
  • Unknown's avatar

    Alternative solution (no ID numbers needed):
    Upload the two individual images via Media > Add New (dashboard sidebar). Then edit the post and a) upload and insert the gallery images via the Add Media tool of the post, b) insert the already uploaded individual images via the Add Media tool again, this time clicking Media Library.

  • Unknown's avatar

    justpi, thanks for the alternative way…basically, when I edit the post, I have to upload and insert the gallery before inserting the individual images. But these ones must have been uploaded before editing the post…if not, the individual shots would be added to the gallery automatically, wouldn’t they? Anyway, I’ve tried and looks like an excellent solution without lists of number to discover and write down…thanks again…

  • Unknown's avatar

    You’re welcome.
    A gallery normally displays all the images that are attached to a post; that is, all the images that have been uploaded from your computer to your blog via the Add Media tool of that post. Images uploaded via Media > Add New aren’t attached to any post, so they won’t be part of a gallery.

  • Unknown's avatar

    Unless somethings changed, when those unattached Media Library images are inserted in the post, they’ll become “attached” to that post.

    The way to get around this is to upload those images to an existing, published post, but to not insert them in that post. Make sure the post you’ve uploaded the extra images to does not include a Gallery, otherwise they’ll be included in that Gallery.

    After you’ve uploaded the image, close the post where you uploaded the images, go back and insert them in the post where you want them to appear.

  • Unknown's avatar

    Right Jen, thanks, sorry fotodivagando, do as Jennifer says!

  • Unknown's avatar

    @fotodivagando
    Oh it looks like I misguided you. Sorry!

  • Unknown's avatar

    ~~hnsaifi, your solution will work, but inserting unattached images as justpi suggested will attach them to the post and straight into the Gallery.

    Maybe this will help explain more about inserting single images in a post with a Gallery: http://agallerydemo.wordpress.com/2011/03/08/gallery-with-excluded-image/

  • Unknown's avatar

    Thanks God! And thanks Jennifer for the link.

  • Unknown's avatar

    Guys, first of all thank everybody for suggestions and advices…and no need of apologies, the problem seems not so obvious as I thought. Just let me resume the two ways we can choose for showing photos in a post without inserting them in a gallery uploaded in the same post.
    For doing that, I can:
    1) edit a post, upload all the photos, choose which I want to show as single images and insert them via the media library, insert the gallery, then insert <exclude=”123″> in html page with the id number of the shots I want to exclude…
    OR
    2) edit a post, upload only the photos I want to show in the gallery, upload the single images in another post without a gallery, insert via the media library the single images in the first post (the one I was editing, I mean).
    By now, I prefer the first one (looks cleaner and doesn’t need to spread pics in other – maybe not concerning – posts) even though I have to confess that I can’t find immediately the id number all the times…when I hover over the photo title, I see only…the title!.. without any attachment_id= or similar. I have found just one way to find this damned number, going in advanced settings of the media library in the field “CSS class” where it looks like this: “aligncenter wp-image-388“. And it works.
    Thanks a lot again.

  • Unknown's avatar

    To see the ID number of an image, you go to Media > Library, hover over the image and check the progress/status bar of your browser, or hover over the image, click Edit and check the address bar of the browser.

  • Unknown's avatar

    Ok, I can see the number clicking Edit…thanks again!

  • The topic ‘In a post can I have single photos and a gallery NOT including those photos?’ is closed to new replies.