/simple-photo-albums

A WordPress plugin to convert a group of gallery shortcodes into photo albums.

Primary LanguageJavaScript

Simple Photo Albums

A WordPress plugin to create photo albums from a group of native galleries.

Contributors: Brady Vercher
Requires: 4.3
Tested up to: 4.6
License: GPL-2.0+

Usage

Wrap a group of [gallery] shortcodes with the [simple_photo_album] shortcode:

[simple_photo_album]
[gallery ids="1,2,3"]
[gallery ids="4,5,6"]
[gallery ids="7,8,9"]
[/simple_photo_album]

Each gallery becomes an album and requires clicking through to see the actual gallery itself. This example will render the same as [gallery ids="1,4,7"], which admittedly isn't very useful.

However, there are a few attributes that may be beneficial and things really shine when paired with third-party scripts like Jetpack's Carousel, Magnific Popup, or Swipebox -- native support is included for all (select one on the Settings → Media screen).

Galleries within the album shortcode may include a gallery_link attribute to link the cover image to an arbitrary permalink when a third-party script isn't being used:

[gallery ids="1,2,3" gallery_link="http://example.com/gallery-one/"]

Cover Images

By default the first image in each gallery shortcode is used as its cover image and will be included when the gallery is viewed. A manually defined cover can be passed as an additional attribute:

[gallery ids="1,2,3" cover="25"]

Covers can be removed from the galleries entirely using the exclude_covers attribute on the album shortcode:

[simple_photo_album exclude_covers="1"]

Album Display

Any display-related attributes that can be used on native gallery shortcodes can also be used on the album shortcode to modify its appearance (itemtag, icontag, captiontag, columns, size).

[simple_photo_album columns="4"]

Shortcode Attributes

[simple_photo_album]

Attribute Description Example
exclude_covers A true or false value. 1

[gallery]

Attribute Description Example
cover An attachment ID. 95
gallery_link Absolute URL to the gallery permalink if a script isn't being used. http://example.com/gallery-one/

Installation

Simple Photo Albums is in the WordPress.org plugin directory and can be installed within your admin panel.