Sallie Goetsch [email protected]t: @salliegoetsch Page1 Adding a Photo Gallery to a WordPress Post or Page Inserting one photo at a time when writing a WordPress post is pretty straightforward, but what if you want to add a whole collection of photos? Suppose you’re taking a trip around the world and you’ve set up your blog to chronicle your travels, and in each post you want to include a dozen shots of the city you visited that day? The good news is that WordPress has gallery features built in, so you don’t even need a plugin to add a basic photo gallery to a post or page. The bad news is that it requires more steps than adding a single photo. In fact, if you’re not used to WordPress, the latest features to help you display galleries might just make things more confusing for you. (The WordPress development team knows it needs to work on media, but hasn’t had a chance to tackle that yet. Improvements are in the pipeline.) Meanwhile, WordPress galleries aren’t really that difficult once you get used to them, and there are some great plugins and themes to allow you to add some spectacular effects. Here are the steps to insert a no-frills photo gallery without adding any plugins. 1. Open the edit screen for the post or page where you want to insert the gallery. You can create a new post, or add the gallery to an existing post. 2. Position your cursor where you want the gallery to appear. Moving galleries after you insert them is more trouble than putting them in the right place to start with. 3. Click the Insert Image button at the top left of the post/page editing area.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Adding a Photo Gallery to a WordPress Post or Page Inserting one photo at a time when writing a WordPress post is pretty straightforward, but what if you
want to add a whole collection of photos? Suppose you’re taking a trip around the world and you’ve set
up your blog to chronicle your travels, and in each post you want to include a dozen shots of the city you
visited that day?
The good news is that WordPress has gallery features built in, so you don’t even need a plugin to add a
basic photo gallery to a post or page.
The bad news is that it requires more steps than adding a single photo. In fact, if you’re not used to
WordPress, the latest features to help you display galleries might just make things more confusing for
you. (The WordPress development team knows it needs to work on media, but hasn’t had a chance to
tackle that yet. Improvements are in the pipeline.)
Meanwhile, WordPress galleries aren’t really that difficult once you get used to them, and there are
some great plugins and themes to allow you to add some spectacular effects. Here are the steps to
insert a no-frills photo gallery without adding any plugins.
1. Open the edit screen for the post or page where you want to insert the gallery. You can create a
new post, or add the gallery to an existing post.
2. Position your cursor where you want the gallery to appear. Moving galleries after you insert
them is more trouble than putting them in the right place to start with.
3. Click the Insert Image button at the top left of the post/page editing area.
Power Users’ Clinic: Gallery Shortcodes In earlier versions of WordPress, the only way to insert a gallery was with the shortcode [gallery]. Used by itself (you can type it into either the visual editor or the HTML editor), the [gallery] shortcode will display a gallery of all images attached to that post or page.
But you can do more, because shortcodes come with options. In fact, the [gallery] shortcode comes with more options than you have when you insert a gallery through the file upload screen. The options associated with the [gallery] shortcode are:
columns: number of columns in the gallery.
id: ID of the post whose images you want to display. It does not have to be the post you’re putting the gallery into. You can find the post ID by hovering over the post title in the All Posts list and looking down into the lower left corner. You’ll see a small popup that says something like “http://your.domain.com/wp-admin/post.php?post=ID&action=edit,” except there will be a number after the “post=” instead of the word “ID”. That’s the post ID number.
size: the image size to use for the thumbnail grid: thumbnail, medium, large, or full. The default is “thumbnail.”
orderby: the criterion for ordering images. The choices are menu_order, date, title, ID, and RAND.
order: ASC (ascending) or DESC (descending).
link: determines whether the thumbnails link to full-size images (file) or attachment pages (attachment).
include: tells the gallery to include specific attachment (image) IDs. You find these by going into the WordPress Media Library and hovering over the image title. A popup appears in the lower left corner of the browser, the same way it did to show you the post ID.
exclude: tells the gallery to exclude specific attachment (image) IDs. You can use either the “include” or the “exclude” option in one shortcode, but not both.
So if you wanted to insert a gallery that used a single column of large images, ordered by ID, and including attachments 17, 18, 19, 25, 26, 27, 34, 35, 36 (from three different posts), the shortcode would look like this: