Inserting galleries

If you want to just insert a picture as an illustration or example in an article, at whatever size, then read this page instead.

There are several slightly different galleries used across this site, with varying degrees of pre-designed elements. Galleries have two main purposes – they group multiple images and they allow small images to be enlarged for detailed viewing. Galleries are mainly called in by a line of code within the body of a page/post. You are best viewing the content in the Text version of the editing window rather than the Visual tab.

Galleries already set up on the site

Some galleries are already set up – each collection of recently added images down the side of each map page is already primed for you. These have a line of gallery code that displays the most recent 10 photos from a particular category (these categories denote which map project they connect with) and continually update themselves. Their codes can be found in seven ‘Thumbs’ posts in the 365 Maps list. The code looks like this: [mla_gallery attachment_tag=map7 numberposts=10 orderby="date DESC" columns=2 mla_alt_shortcode=gallery mla_alt_ids_name=include] and contains bits that call in the gallery and say what is to be included in it.

Galleries that you can insert

The most useful part of a gallery is that you can click on a small (thumbnail) version of an image and it will open into a big version in a lightbox-style gallery (ie: a bigger view that lies on top of the page you are currently looking at). There are several variations for how these thumbnails can be displayed. If you want a more condensed way of display a group of images, you can also display them as a slideshow.

Inserting (a limited number of) thumbnails that can be enlarged into a big gallery, or slideshows

Open the post/page/snippet in the editing window. Put the cursor where you want to insert the gallery.

  • Click Add Media and on the very left of the window that opens, second item down says Create Gallery. Click it.
  • The main part of the screen displays thumbnails of all available images. Use the search options at the top of this section to filter them if you need to – for example, you can choose the Attachment Category that you used to classify a bunch of photos recently uploaded.
  • Click on the thumbnails you want to include. If you haven’t yet included copyright information, titles, captions and want to, then use the right hand column boxes that appear as you click the thumbnail to fill in these details one by one.
  • When you’ve selected all the images you need, click the blue Create a new gallery button bottom right.
  • Now you will see your final selection. There is another opportunity to edit or add captions here. In the right column, leave Link to showing Attachment Page, then jump down to the bottom option that says Type. The best options for this site are Tiled Mosaic, which we use for inserting the images as a group of thumbnails, or Slideshow.
  • Finally, press the Insert Gallery button.

Inserting a larger collection of images into a gallery

If you have 30 or 40 pics that you want to display, ie: a whole ‘album’ of pictures say from a particular event, here is a better method of inserting the gallery. This saves you having to go through and select 40 thumbnails, and means that if you change or add photos in that event (ie: that attachment category) then they will get automatically updated in the gallery.

  • This needs to be done in the Text view of the editing window so when you edit or write a new post, click on the text tab.
  • Enter this code on a line with a return above and below it:

    [mla_gallery attachment_category=the-slug-of-your-category mla_alt_shortcode=gallery type="rectangular" mla_alt_ids_name=include]

    You will need to put the slug for whatever category you need after the attachment_category= bit. If you want to filter it by the picture tag, then remove than bit completely and replace it with attachment_tag= and add in the slug (the slug can be found in the list under Media in the left menu). If you want a slideshow rather than tiles, change ‘rectangular’ to slideshow.

For more on how selective and fancy you can be with these gallery displays, view ‘Media Library Settings’ in the Settings menu at the bottom of the lefthand menu (Administrators only). You can also put this line of code (or insert a WP gallery in the Add media way) into a Snippet or 365 Maps post and call it in as a page extra – as described in Inserting items into other areas.

Here is an example of the above code in action (view in the Text edit window to see and copy this code):
[mla_gallery attachment_category=embroidered-map-close-ups-hayley mla_alt_shortcode=gallery type="rectangular" mla_alt_ids_name=include]

[mla_gallery attachment_category=embroidered-map-close-ups-hayley mla_alt_shortcode=gallery type=”rectangular” mla_alt_ids_name=include]