Galleries

 

Displaying All Galleries (🔗)

Flickr Galleries can be viewed by the short-code usage:

[gallery type='flickr' view='galleries']

The above displays all Galleries for the user. It does the following:

  1. Displays thumbnails of each of the Galleries for the user, with options to turn off the title and photo-count display.
  2. Each Gallery’s thumbnail can be clicked to launch a slideshow for that Gallery.

The following is an example displaying all of Harald Müller’s Galleries:

With a simple tweak of the short-code invocation you can make this display a single Gallery:

[gallery type='flickr' user_id='abc' gallery_id='xyz']

You can see the usage here, where I have displayed a Gallery from Harald:

Note that Flickr’s gallery implementation has a quirk, which makes it mandatory for you to put in the User Id if you want to view a single gallery.

In the above, you could also use the headers parameter to control what you show in the header. It accepts a comma-separated list containing thumbnail, title and counter in any order. Setting headers='title,counter' will show just the title and the counter, and no thumbnail. This setting overrides whatever you have defined in the back-end for the header display.

A Filtered List of Galleries (🔗)

What if you wanted to display a single gallery, but not show the photos inside? In other words, what if you only wanted to show a single thumbnail for the gallery? You can use the filter attribute for this. Using filter requires you to pass both, user_id and view. The filter attribute can have a comma-separated list of gallery ids e.g. filter='abc,xyz':

The above has been generated using the following shortcode. I have 3 albums, and this pulls 2 of them:

[gallery type='flickr' user_id='49681938@N06' view='galleries' filter='72157627023882381,72157623824752075' layout='random']

What if I wanted to display every gallery except the two above? I simply add another parameter to my shortcode, filter_type='exclude':

[gallery type='flickr' user_id='49681938@N06' view='galleries' filter='72157627023882381,72157623824752075' layout='random' filter_type='exclude']

By default filter_type is set to include.

“Show More” and Paged Results (🔗)

If a gallery has a lot of photos and you want to reduce the count, Photonic offers a couple of approaches:

  1. For Flickr, use the per_page attribute and add an additional tag, more. This will initially show you the number of photos specified in per_page, and a button to load more images. Upon clicking the button you will see an additional set of photos as limited by per_page. The button will continue to show until you have exhausted the entire set of photos.
  2. Photonic can be used in conjunction with <!-- nextpage --> to display photos in a paged manner. For this you can structure your page content thus in the WP Editor:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porta enim vel tellus dignissim, a venenatis neque congue. Nunc ornare cursus leo ac viverra. Pellentesque suscipit pulvinar metus, non aliquam odio egestas quis. Vestibulum porta viverra magna, vel malesuada ante fermentum vitae.
    [gallery type='flickr' photoset_id='72157625600954257' layout='circle' per_page='100' page=1]
    <!-- nextpage -->
    [gallery type='flickr' photoset_id='72157625600954257' layout='circle' per_page='100' page=2]
    <!-- nextpage -->
    [gallery type='flickr' photoset_id='72157625600954257' layout='circle' per_page='100' page=3]