Support » Requests and Feedback » Gallery short tag – “exclude” argument

  • Hi.

    Really digging the new gallery short tag feature in 2.5. One thing does bother me about it though, What if you want to exclude some attachments from the gallery? How would you go about doing this. In my blog, I would like to upload images to the post, add some images to the content, and then have the remaining images show up in the gallery below. Is this possible with the current version? Is it being considered for new releases?

    Thanks to anyone who knows anything about this,

    btw – If we could get the right-hand sidebar back in the write post screen – that would SERIOUSLY rock 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • I guess no one knows anything about this….

    I played around with the new shortcode api and made a simple plugin that accomplishes what I need it to. I sets a param to the [gallery] short tag which will allow a user to include a comma separated list of attachment id’s.

    Check it out and let me know what you think.

    Yes, it would be great if there was a setting saying “if image is already used in post, don’t show in gallery”. We use a number of images for longer articles and there’s no need to repeat them amongst other images in a potential gallery at the end.

    Try this: mf_gallery_shortcode()

    it’s a fix that I came up with 🙂

    Hello mfields,

    Nice plugin! Only when I activate the plugin and use the [galley ids=”12,43″] I get “Missing Attachment”. What do I do wrong!

    This would be perfect if it had an “exclude” parameter somehow. (Unfortunately I’m no plugin pro, so I couldn’t figure it out myself.)

    Example, I have written a post that has 12 images I want in the gallery, and one which I want to use later in the post, NOT in the gallery. Rather than having to include the id numbers for 12 images, it’d be much easier to exclude just one id number…

    I GOT IT!!!!

    Man, I’ve had the same problem for soo effing long it’s ridiculous. But I just sorta made up a code based on what I know of regular HTML coding and it actually worked.

    So here it is:

    Let’s say you post four photos and then want to include the [MORE] code to cut the post in half and add the [GALLERY] code after the jump.

    What you would do is put this code around the photos you don’t want to repeat.

    <no repeat>PHOTOS</no repeat>

    It’s the same concept behind doing bold and underline or italic codes (<b>sample wording</b>, <u>sample wording</u>, <i>sample wording</i>).

    I did that and the photos didn’t repeat. FINALLY!

    Hope this helps!!


    Nevermind. It didn’t work. It still repeated them. Dammit!!! Back to the drawing board. I wish someone posted the answer. Boo. =(

    You can use the exclude function that the plugin mf_gallery_shortcode() provides

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Gallery short tag – “exclude” argument’ is closed to new replies.