Gallery Shortcode

This documentation only applies to the Meerkat theme. If you are using a different theme, refer to the codex gallery shortcode documentation.The gallery and the wms_gallery shortcodes (examples shown below), have many possible attributes, some of which can only be added by editing the shortcode directly.gallery-sc

Note: the gallery shortcode can only be viewed when editing a page/post in text mode. In visual mode, it appears as a blue box.

[wms_gallery type="grid" size="thumbnail" caption="no" columns="3" ids="49,48,47,46,45"]

Image selection

id
Default: current page/post ID

Gallery will consist of all images attached to (i.e. uploaded while editing) this post.

ids
Default: none

Gallery will consist of images corresponding to this comma separated list of attachment IDs. If this attribute is set, exclude and include values will be ignored.

include
Default: none

Gallery will consist of images corresponding to this comma separated list of attachment IDs. This value is ignored if the ids attribute is set.

exclude
Default: none

A comma separated list of attachment IDs to exclude from the gallery. This value is ignored if the ids or include attributes are set.

Sort order

orderby
Default: menu_order

Specify how to sort the gallery images.

  • menu_order
  • title
  • post_date
  • rand (or random)
order
Default: ASC

Specify the sort order – ascending or descending.

  • ASC
  • DESC

Formatting & Behavior

type
Default: grid
  • grid
  • slideshow
  • filmstrip

See demos of the 3 gallery types

size
Default: thumbnail

Specify which size of the image to use.

  • thumbnail (or thumb)
  • medium
  • large
  • full
columns
Default: 3

Specify the number of columns in a grid layout gallery. This value does not affect animated slideshows or filmstrip galleries.

caption
Default: no

Display the image caption below the image.

  • yes
  • no
speed
Default: 5

How long to spend on each picture of a animated slideshow. This value is ignored unless type is set to slideshow.

align
Default: center

Alignment for animated slideshows. This value is ignored unless type is set to slideshow.

  • left
  • right
  • center
pause
Default: yes

Provides a pause/play button when hovering over an animated slideshow. This value is ignored unless type is set to slideshow.

  • yes
  • no
link
Default: file

Determines what clicking on an image in a grid gallery will do. This value is ignored unless type is set to grid.

  • file: a larger version of the image will pop up in a lightbox with previous/next navigation
  • none: image is not clickable, no lightbox appears
  • permalink: clicking on the image will take you to a page that has the image (at medium size) and the image’s description.
  • parent: clicking on the image will take you to the page/post that this image was uploaded to (sometimes used in sidebar gallery widget)
classes
Default: none

Add one or more CSS classes (separated by spaces) to the gallery container to change the overall style.

  • ngg: formats a grid gallery & its captions to look like a NextGen gallery. example