WordPress Plugin Grid Gallery With Custom Links – Advanced Options
In most cases your Grid Gallery will work well with the default settings. The Advanced Options are used for some fine adjustments if needed.
Images Height Option
To create a responsive grid with no gaps, each item container (image + text) has to have the same height. Grid Gallery uses a custom script to find the tallest container and set the other ones to have the dimension. If all your images have the same height, you can keep the default option.
- All images have the same height (Default). Images can have different widths. You have captions and/or long descriptions.
- Images have different heights. Use this option to have images bottom aligned. By default browser aligns images to the top of the container.
- All images have the same height. You have no captions or short, one-line captions. In such case, the build in script is not needed. You can select this option to remove the script from a page.
Item Containers – Height Adjustment
For your grid to work, all item containers have to have the same height. Grid Gallery finds the tallest container and sets the height of the other ones. In some cases the calculated value may be too small by a few pixels and you'll see some gaps in your grid. You can easily fix this by increasing a height of the containers.
How to increase a height of the Item Containers
- Go to Options > Item Containers – Height Adjustment
- Enter number 5.
- Refresh your Grid Gallery page.
- If the gaps are gone, decrease the number by one and preview the page.
- If the gaps are still present, increase the number until they are gone.
Height adjustments are in pixels.
Captions Container Width Options
Default – The same width as an image. Container will expand vertically to accommodate its content. Text will wrap.
None – Container will expand horizontally to accommodate its content. Text won't wrap.
Custom width – You can set the width to any number of pixels. Container will expand vertically to accommodate its content. Text will wrap.
When to use Custom width instead of the Default one?
Default option requires the image size to be provided by the WordPress gallery. Sometimes this info is missing and you have to set the width manually.
Why the image size is missing?
Some of the image resizing plugins like Photon don't provide image dimensions.