2 thoughts on “sample post in “Gallery” format”

  1. The preceding sample gallery format posting was trickier than I expected, in part due to somewhat confusing, incomplete, and probably outdated WordPress help on this subject.

    What was not obvious to me is that the gallery format only works with images that have been uploaded into WordPress’ “Media Library”, not with links to random images specified via URLs. Furthermore, these Media Library images must be “attached” to the post, and a given Media Library image can be attached to at most one post. Once I finally understood these points, it was still a bit of a challenge to figure out how to include images into the gallery display component, because the relevant WordPress documentation seems to have some errors and omissions, possibly due to being out of date.

    Here’s a sketch of the procedure to get a gallery post working:

    1. While editing the post, click the Upload/Insert (Add media) icon to upload some sample images, which will automatically be stored in Media Library and attached to this post.
    2. In the Add Media dialog, select the the Gallery tab, which is available only after you’ve uploaded at least 2 images.
    3. On the Gallery tab, enter sequence numbers in the Order column, which is initially all blank. (This column was not lined up properly under its heading, making usage even more confusing!)
    4. Click “Save all changes” to make these changes take effect.

    Once you get this far, you’ll see there are more options for gallery settings and options you can specify for individual images, and the rest looks pretty easy. (Alternatively, you can update images to your Media Library separately from editing the gallery post in which you wish to include them, but it’s more convenient to do the uploads in the process of editing the post.)

    Note the difference between how this sample gallery format post is displayed on the main blog page compared to the individual page devoted to this post. On the main blog page, there is an automatically generated line (“This gallery contains 6 photos”), followed by the accompanying text in the post. In the main blog page, however, you can’t see the separation between text that was placed ahead of the image gallery vs text that follows it. Also, the main blog page doesn’t display various flavors of text, e.g. bold face and hyperlinks. Another interesting wrinkle is that Chrome displays the first image of the gallery, but Internet Explorer (IE8) doesn’t display any of the gallery images in the abbreviated entry for this post on the main blog page. (Both browsers show all of the gallery images in the individual post page, though.)

    What http://codex.wordpress.org/Post_Formats says about this format:

    gallery - A gallery of images. Post will likely contain a gallery shortcode and will have image attachments.

    Related references:

    1. The preceding post and comment, originally created under the Twenty Eleven theme, are now being displayed under the Twenty Fourteen theme. Previous comments about discrepancies between this post’s appearance in the blog and its appearance in the post page no longer apply with the Chrome browser, but they still apply for Internet Explorer 8 (IE8).

Leave a Reply