Galleries are everywhere. You can see them on social networks, any online store, and even blogs with step-by-step tutorials like this one. Using a gallery is a great way to merge a large number of images in a relatively small space, supplement content, and provide visual materials to arouse more interest.
One of the lesser-known features of WordPress is the ability to add photo galleries almost anywhere without installing any plugins. Therefore, this feature is often overlooked by most users, which means that the potential of the tool is wasted. We will learn how to create your own galleries and the best way to use them on your website.
Create a native gallery in WordPress
Creating a native image gallery in WordPress is a fairly simple process. First, you must go to the page where you want to add the gallery, or at least create a new post to add your content to.
After entering the edit screen, you have to click the button Add object, Open the media window.If you look at the left side of the window, you will find a link that says Create galleryClick this button and the window will change slightly, indicating that you are now ready to create a photo library.
Here, you must select all the photos you want to include, or add the required photos from the PC. You can select them by clicking once on each photo, and deselect them by clicking again. In the bottom bar of the window, you will see how many photos you have selected for the gallery.
When you have all the photos you want to use, click Create New Gallery. Now you will see a configuration view through which you can choose the shape and behavior of the gallery.The most important thing to remember is the field Column Yes Association A.
site Column It will help you specify the number of columns to include in the gallery-based on the number of photos you choose, my suggestion is Select some columns to avoid making the last row incompleteIn addition, it is best to use at most 5-6 columns, otherwise the thumbnails will be too small.
site Association A It can help you specify what happens when a visitor clicks on a thumbnail in the gallery:
- Attachment page: It will take the image to a page that represents the media file you are using.
- Media files: It will link the gallery directly to the related file-the image itself.
- not any: It will not link to the image in any way.
because The attachments you upload to WordPress are also posts (Although they are of the “attachment” type), they have their own pages that can be accessed through the appropriate URL. However, most WordPress themes do not specifically use these types of pages, and even some plugins (such as Yoast’s WordPress SEO) can choose to disable this feature. For this reason, my suggestion is to choose one of the other two options whenever possible.
If you use options to link to multimedia files, you may need to use Jetpack plugins.One of the many features that this plugin has is Create a slideshow when creating a gallerySo that you can provide a better way to visualize them to your readers. If Jetpack does not seem to be able to use this feature only, you can install Gallery Carousel without JetPack, which only contains this feature.
After selecting the settings, click Insert Gallery, and your gallery will be embedded in the page content. Here you can see an example of a step-by-step image for this tutorial:
Details | Demo
Mhr Gallery is a plug-in that allows you to easily create and modify your gallery. You can freely resize the image container by controlling its height, width and aspect ratio. All you have to do is switch the gallery from “Creative Gallery” to “Custom Grid”, and then start resizing the image by clicking and dragging the image in the gallery.
If you decide to try Mhs Gallery, you will quickly notice that the plugin is designed to serve WordPress users regardless of their experience. Its easy-to-use drag-and-drop interface and settings allow you to create a gallery that looks like one of their demos in less than five minutes. Also, if you are a photographer who wants to show albums and maybe even sell your photos, then you will be very satisfied with this plugin.
Among its most important features, we can emphasize:
- The layout of the management panel;
- Use mobile design;
- Long-term support
- Provide GPL license;
- Easy installation;
- Tianma Gallery
Gallery advanced options
However, this is not what your native WordPress gallery can do. If you go to the “Text” tab of the visual editor, You will see that the gallery you created uses the following code:
The code in question is a shortcode, which is a very useful WordPress function I talked about earlier.Native WordPress galleries mainly work through shortcodes
, They can be embedded almost anywhere on your website. All the above process is just a simpler and more practical way to create a picture library, because you can also create a picture library by writing a shortcode manually.
If you look at the code that makes up the shortcode, you will notice that it uses a series of parameters (such as a link or ID) to define the appearance of the gallery and the images to be merged. Although the Multimedia Manager is a fairly powerful tool for creating galleries, the truth is that it does not show you all possible configuration options. Shortcodes have some additional parameters that you can use, they can help you create better galleries:
[definition title=”size”]Allows you to specify the size of each thumbnail. By default, the WordPress gallery will use a 150×150 pixel thumbnail, if you use few columns, the thumbnail will be small.With this parameter, you can use things such as Moderate, Big,O full.[/definition]
By default, images are sorted according to their order in the media manager. However, using orderby you can indicate other ordering methods:
- title -Sort by image title.
- Release date -Order by date.
- Rand -Random sorting.
[definition title=”order”]This field is a complement to the previous field.You can use it to define the direction of image sorting, using ASC Oh Development Research Center.[/definition]
[definition title=”id”]Usually the gallery will use parameters Numbering Indicates all images to be included.site ID It is an older version and you can use that version to link all the images attached to a particular post. Just add the post number.[/definition]
Native WordPress galleries are rarely used, but so they are not more restrictive than plugins specifically used to create them. If you want to create a gallery, my suggestion is to explore this feature already integrated with WordPress before launching to use plugins that accomplish the same task.