Have you ever wanted to display some images in a post? Maybe multiple images and not have to do a lot of work to make it look nice?
Perhaps you have a personal blog and you want to share some pictures of a recent vacation? To see what I am talking about, let’s start at the end first! Take a look at My Gallery Example to see what the final result will be.
This is really easy to do via the use the [ gallery] shortcode that is provided in WordPress.
The first thing you need to do is to upload the images you want to display for a post. This is done via the regular Add Media toolbar:
You are probably familiar with this button when you inserted images into your posts. This is the button you use to do that! You would click on the Upload/Insert button to upload or select a picture in your media library, and then click on the ‘Insert into Post’ button.
However, for including images for your gallery, you want to select Create Gallery from the upper left selection:
This will now allow you to select multiple images to be displayed. Simply click each image in order to add it.
Repeat this for all the photos you want to display for that post. You will see a check mark appear in the upper-right corner of the image.
Here is a time saving tip for you when you go int Insert your first image – select MULTIPLE images at once! When you do it this way and select multiple images, you will see the gallery options right away:
At this point, you can simply click the ‘ insert gallery’ button, or you can modify the settings.
Slightly more advanced options:
1) The gallery shortcode will display thumbnails of your images, by default. This is the size set in your Media submenu under Settings. You can choose to display the images at Medium or Large sizes (again, according to the settings in your Media menu), or at the full size of the image. Just use the following format:
2) Want more columns of images? Change the columns you want the images to display in by using this format:
This example would display images in 4 columns.
4) If you want to show images that are attached to another of your posts, just locate the ID number of that post and use this shortcode:
and replace “123” with the ID of the relevant post.
5) Combine options in the following way:
6) If you want to find out more about the Gallery Shortcode, check out the Codex for more detailed information.
Betsy says
This is certainly something I will need to try, I am on WordPress and feel lost a lot. I usually go to a friend to see if they can help, I will be following. Thank you!
Paul says
Have fun with it Betsy! By the way, if you are lost with WordPress, check out WP Site Help. You can get answers to all your questions!
Wendy (The Local Cook) says
Thank you for this! I have used the gallery feature but not the shortcodes. Just wondering, have you come across an easy way to import selected images from Flickr?
Paul says
Wendy – I used to have a great plugin that I used that searched Flickr for images that gave permission to be used, however, that plugin was not kept up to date and does not work with the current version of WordPress. I had to stop using it. Remember that you cannot use ANY image you see on Flickr – only those images that indicate it is OK for you to use them! You do not want to be accused of plagiarizing and possibly have to pay a fine!
Wendy (The Local Cook) says
I don’t need other people’s images, I need my own 🙂 It is so easy to upload a bunch of photos from my phone to my flickr account, but then it’s a pain to then try to download some of them one by one to create a gallery. I guess I could explore uploading directly to wordpress from my phone a little more.
Paul says
Here is how I handle that scenario. All my photos on my phone get downloaded onto my computer – this happens every day when I connect my phone to my computer. When I go into WordPress, I can easily grab multiple images from my computer and upload them all at once using the Media Library. Are you aware that you do not have to upload individual images that way?
Does this help, Wendy?
Melinda says
I don’t use WordPress but I’ll have to see if my host has something similar as this could be very useful, especially for my craft how-to posts. Thanks!!
Angelika says
I’ve used gallery before but with this short cut it would have been a lot easier. I’ve bookmarked this page – thanks!
Paul says
Glad this can help, Angelika! Let me know if you have any questions about them.