[resolved] Gallery Post Id Shortcode Bug? (8 posts)

  1. jeanne38654
    Posted 3 years ago #

    I'm trying to insert multiple galleries into a page. However, when I use this:

    [gallery id=”X” ]

    The wrong images are displayed (no matter what value I put in place of "X".)

    So, let's say I have post ID 123 with 3 images.
    And also post ID of 456 with 3 images

    If I put [gallery id=”123”] it does show images - but not the ones associated with post ID 123!!! In fact, it is displaying 5 images (the only 5) that are not attached to ANY POST or PAGE! What the heck? Any ideas? Anyone else have this issue? Weird!!

  2. jeanne38654
    Posted 3 years ago #

    UPDATE - So I attached those 5 "unattached" images to a page. Now the gallery shows nothing.

    So, basically using shortcode [gallery id="x"] is buggy - only shows unattached images, not images associated with the post id and if there are not unattached images, it shows nothing.

    Surely someone else has this issue? I'm using WP 3.4.2

  3. jeanne38654
    Posted 3 years ago #

    And, I just tested this on another installation - standard, clean, using twenty-eleven theme. Same problem. Shortcode [gallery id=”X”] does not work. Must be that is not correct shortcode - but codex says it is? See this from the codex:

    specify the post ID. The gallery will display images which are attached to that post. The default behavior if no ID is specified is to display images attached to the current post. For example, to display images attached to post 123:
    [gallery id="123"] " - From http://codex.wordpress.org/Gallery_Shortcode


  4. jeanne38654
    Posted 3 years ago #

    SOLUTION - for anyone else scratching their head trying to figure this out.......... I had to do it THIS way:

    [gallery galleryid="xxx"]

    Which is NOT what the codex says. Only reason I figured that out was looking at source file of original post page and saw galleryid=779...note "galleryid" has to be all one literal.

  5. jeanne38654
    Posted 3 years ago #

    Issue resolved

  6. anthwinter
    Posted 2 years ago #

    I am having the same problem and your solution didn't work for me. This has me very confused. (using v3.5.1)

  7. galeroy
    Posted 2 years ago #

    I'm having the same problem (using version 3.6.1). The solution above [gallery galleryid="xxx"] didn't work for me either.

    It appears that this problem isn't related to a particular theme or any user mods for a given theme. [gallery id="xxx"] just doesn't work.

    If anyone comes up with a solution for this - please post!


  8. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @galeroy - this thread is marked resolved and it's regarding an old version of WP - please start your own thread if you need help - http://codex.wordpress.org/Forum_Welcome#Where_To_Post

Topic Closed

This topic has been closed to new replies.

About this Topic