I’ve mentioned previously that I use the Jetpack Plugin on almost every WordPress website I setup. Jetpack has come a long way and is generally very reliable and adds awesome functionality. One of the modules / functionality that is unbelievably simple to use compared to using another plugin is Tiled Galleries. Tiled Galleries allow for showing images in various great looking predefined formats. Until Jetpack came along with Tiled Galleries many people used the NextGEN gallery Plugin for WordPress. Although NextGEN includes alot more functionality than Jetpack in terms of displaying images, for a relatively simple gallery, Titled Galleries is so much simpler to use.
Why is the Tiled Gallery so narrow?
One problem I’ve come across fairly often with the Jetpack gallery is that the width of the gallery isn’t the full width of the Page or Post (whether you’re using a sidebar widget area or not). Fortunately there is a simple fix to the problem of the gallery being too narrow.
Here is how to make the Jetpack gallery the full width of your page or post:
- Open functions.php (this may be in your Theme folder or even better, use your own custom functions.php).
- Add the following:
if ( ! isset( $content_width ) ) /**set width below **/ $content_width = 1020;
- Save the changes back to the webserver.
Note that in the above, you’ll need to set
$content_width = 1020;
to the width you require the gallery (in this case I was using the Canvas Theme with a full width of 1020px).