Multiple galleries

  • Author
    Posts
  • #841766

    hnsaifi
    Member

    Why can’t I add multiple galleries within a post? I’ve tried it several times. I added galery1 first then uploaded some more pics to create a new gallery. The new pics go to gallery and pictures of gallery1 and G2 were combined. Now I deleted pics of G1(from back hand gallery not from post) and add pics of G2 into the post. But all I get was only pics of G2 in two galleries. Aah I’m frustrated. And sorry for my poor presentation of question.
    Is there any simple way of adding multiple galleries without CSS. My new post is a comparison between the two so I don’t wanna have all of them into a single gallery. Any idea?

    The blog I need help with is itspak.wordpress.com.

    #841897

    justjennifer
    Moderator

    Upload all your photos to the post, switch to the HTML Editor and add “Include” and the image IDs in the Gallery shortcode to separate them into however many galleries you need.

    See here: http://en.support.wordpress.com/images/gallery/#gallery-shortcode

    #841901

    hnsaifi
    Member

    Thanks Jennifer

    I uploaded all photos to the post
    Switched to HTML editor
    Created another gallery as [ gallery id=”xx” columns=”3″ ]
    But what it showing is the two galleries with same 18 photos in each. Yet I wanted 10 images in one and 8 in the other one. What am I doing wrong? Is image id its file name?

    #841907

    hnsaifi
    Member

    I added exclude=”images id’s” in first gallery and include=”images id’s” in second gallery but it’s still not working. What’s the problem? Second gallery doesn’t exist at all and all the images are in first gallery. Please guide me.

    #841908

    justjennifer
    Moderator

    As it says in the Support document, you need to use the image ID# in your “include” so that the shortcode looks like:

    [gallery columns="3" include="153,159,155"]

    and the second Gallery

    [gallery columns="3" include="157,156,152,154"]

    #841910

    hnsaifi
    Member

    From where to get the image id?

    #841912

    justjennifer
    Moderator

    @hnsaifi-Please read the support doc I linked to above. It explains this information right under the table with the available Gallery parameters.

    #841913

    hnsaifi
    Member

    What’s wrong with this code? Shouldn’t I add this code? [gallery columns="3" link="file" exclude="851,852,853,854,855,856,857,858" orderby="title"]

    [gallery columns="3" include="851,852,853,854,855,856,857,858" size="medium"]
    I’m not sure what am I doing wrong.

    #841914

    justjennifer
    Moderator

    In principle, it should work and indeed on my test blog it does.

    Try only using exclude in the first gallery and then include in the second gallery, without the other parameters (columns, size, link), so it will read
    [gallery exclude="851,852,853,854,855,856,857,858"]

    and for the second Gallery
    [gallery include="851,852,853,854,855,856,857,858"]

    FWIW You don’t have to use columns=”3″ as that is the default.

    #841971

    hnsaifi
    Member

    Great! This one did the trick.
    Thanks a ton Jennifer :)
    I’m finally succeeded to upload multiple multiple galleries.
    But I don’t know why adding other parameters manually messes the gallery. However for the assistance of others.
    To add multiple galleries
    1) Upload multiple images from your computer.
    2) Add them into the post via add gallery. Don’t add any parameters manually i-e gallery should look like this [gallery]
    3) Add exclude=xx,xy,xz” as [gallery exclude=xx,xy,xz"] and add [gallery include="xx,xy,xz"]
    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=).

    #841972

    I can’t be doing with fiddling around getting image ids. A much much easier way is to create a page (or post) for each gallery. These pages (or posts) are just containers.

    In your post to be published, you simply insert the gallery shortcode with “id=postid” for each gallery.

    This scheme makes it far easier to add new photos to the gallery of your choice. Just upload it to the corresponding page (or post).

    #841973

    timethief
    Member

    @knashermac2009
    I’m with you on that. :)

    #841974

    hnsaifi
    Member

    Was I a fool in doing all this?

    #841978

    justjennifer
    Moderator

    Sure you can do it that way, too. Just make sure that every Gallery is published or the visitor will encounter a 404 error.

    Using the Post ID number, you can repost the same Galleries anywhere on your site and also edit them with includes/excludes. http://wp.me/P1mE2e-8V

    And *how* do you find the Post or Page ID? :) Same way you do the Image ID, but hovering over the Post/Page title on the Edit Posts screen or Edit Pages screen. :)

    #841979

    justjennifer
    Moderator

    No, the Gallery feature has been a work-in-progress since April 2008. Maybe someday it will work as users expect it to. :)

    #841980

    timethief
    Member

    @justjennifer

    Just make sure that every Gallery is published or the visitor will encounter a 404 error.

    Thanks as that explains why it worked for me.

    #841982

    hnsaifi
    Member

    To create a 404 error and still look for the same id’s things is more foolishness. Thanks God no one suggested me this in the beginning of this thread. Thanks Jennifer.

    #841983

    justjennifer
    Moderator

    You are welcome, tt and hnsaifi.

    Sometimes users end up using features in ways that perhaps the developer didn’t anticipate and that can make more problems, er, interesting challenges.

The topic ‘Multiple galleries’ is closed to new replies.