Creating a Gallery

A gallery displays a set of thumbnail images on a page so it’s easy for visitors to
scan them (Figure 10-3). To take a closer look at a pic, all you need to do is click a
When you click a picture in a gallery, you probably expect to see a larger version of
the image. But WordPress does something a little different, and its exact behavior
depends on how you host your site.

If you run a self-hosted site, WordPress launches what it calls an attachment page,
which displays the larger-size picture along with its description (if you included it)
and a place for comments is a bit fancier—it includes the picture in a photo carousel, and
viewers can step from one picture to the next (or former) by clicking the arrows on
either side of the image (Figure 10-5).

TIP A photo carousel dramatically showcases your pictures without taking the reader away from your post.
Self-hosted sites can get this feature by installing the Jetpack plug-in (page 297). However, some WordPressers
have found that the photo carousel doesn’t work with certain theme/browser/plug-in combinations. So if you
install Jetpack but you still see ordinary attachment pages instead of the photo carousel, you probably ran into
one of these conflicts.

Create a Gallery, Follow these steps:
1. Create a new post or edit an existing one.
2. Click the Add Media button just above the edit box.
3. Upload the pictures you want in your gallery.
4. Once you upload the files, click the Create Gallery link on the left.
5. Enter a description for each picture.
6. Once you add descriptive information for all your pictures, click “Create a
new gallery” at the bottom right.
7. Drag your pictures into the order you want.
8. Tweak your gallery settings (in the Gallery Settings section on the right).

WordPress gives you several options for fine-tuning your gallery. They include:
• Link To.
NOTE If you use the photo carousel feature (page 333), WordPress ignores the Link To setting. Instead, it
shows a photo carousel when a visitor clicks a picture.
• Columns.
• Random Order.
• Type. This setting lets you change an ordinary gallery into a slideshow (pick
Slideshow instead of Thumbnail Grid). However, this setting appears only
on sites or self-hosted sites that use the Jetpack plug-in.
On sites (or Jetpack sites that have the Tiled Galleries feature
activated), the Type list includes three more exotic choices. Tiled Mosaic
packs the pictures tightly together in a jigsaw of squares and rectangles
(rather than spacing them out in the standard, neatly separated squares).
Square Tiles crops each thumbnail down to a perfect square, trimming off
the edges if needed. Circles crops each thumbnail into a circle. The best
way to get a sense for these fancy gallery types is to try them out.

9. Click “Insert gallery” at the bottom right.

If you click the Text tab to switch to HTML view, you see that your post now contains
a shortcode that looks something like this:

There’s an ID number for each picture in your gallery. In the example above, the first
picture in the gallery has the ID number 341, the second one has the ID 185, and so
on. You can find the matching pictures in the media library.
The HTML view of your gallery-enriched post is more notable for what it doesn’t
contain. There are no image tags, links, or other HTML wizardry. Instead, WordPress
examines the shortcode and then creates the gallery on the fly every time
someone requests the page.

Creating a Gallery

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s