Photosets

Photonic supports the following types of photoset displays:

  • Individual photosets
  • All photosets for a user
  • Photoset searches by text
  • Photoset searches by category
  • Popular photosets
  • Recent photosets

To display any of the above, the following parameters are mandatory:

  • type="zenfolio"
  • view="photosets"
  • photoset_type="Gallery" or photoset_type="Collection" – Mandatory if you are not displaying an individual photoset

Individual Photosets (🔗)

To display an individual photoset, the following is the syntax:

[gallery type='zenfolio' view='photosets' object_id='...' limit='10'] 

The object_id above is the id of your photoset. How do you know what that is? Go to a photoset (either a Gallery or a Collection) in Zenfolio, say http://sayontan.zenfolio.com/p619593020/ (this is one of my galleries). The underlined part is your id. The limit parameter is optional, and can help display a smaller number of photos if you have too many.

So, using the shortcode for the above photoset with a random layout:

Password-protected Photosets (🔗)

There are two ways to display a password-protected photoset:

  1. Using the password attribute of the shortcode
  2. Displaying a password prompt when the photoset thumbnail is clicked (see the Groups page)

The following is an example of #1 from the above:

I have used the shortcode:

[gallery type='zenfolio' view='photosets' object_id='p119665567' layout='random' password='Ski']

What is the point of supporting a password attribute in the shortcode? I wrote up a reason / use-case in the Smugmug section of the plugin.

Videos (🔗)

What if you had some videos in the mix? Photonic can handle that too. I have the philosophy that Photonic is meant for photos, not videos, because Photonic’s primary goal is to assist in making photos easily and beautifully presented for photographers using WordPress. In fact most online photo services deprioritize videos with the same philosophy, and some services don’t even have videos! At the time of writing 500px.com doesn’t have videos, and guess what? Native WordPress galleries don’t support videos! That being said, people often use photo services to share personal videos with family, and so, with effect from version 1.66 of Photonic, videos are supported.

Videos are turned off by default for each provider. For Zenfolio the setting is under Photonic → Settings → Zenfolio → Zenfolio Settings → Media to show. Regardless of this setting, you can explicitly pass the media parameter to your shortcode. This parameter takes values photos (to show photos only), videos (to show videos only) and all (to show both photos and videos). I have videos turned off on my website, so I will use the media parameter to show videos from my account:

[gallery type='zenfolio' view='photosets' object_id='p825336194' limit='10' layout='mosaic' media='all']

The above shows the following:

Note that lightboxes have notoriously flaky support for externally hosted videos. Please refer to the lightboxes page to see which ones can be used.

Videos can be incorporated into any layout.

All Photosets for a User (🔗)

To get all photosets for a user, instead of the object_id parameter use the login_name parameter:

[gallery type='zenfolio' view='photosets' login_name='sayontan' layout='masonry' headers='']

Photoset Searches by Text (🔗)

To search for a photoset by text, simply pass the text parameter to it:

[gallery type='zenfolio' view='photosets' photoset_type='Gallery' text='...'] 

The following are galleries returned while searching for “wildlife”:

The results are sorted by date, the most recent showing first. You could alternatively specify an explicit sort_order parameter, which can take the values Popularity, Rank or Date.

The following are the 25 most popular wildlife collections with 5 thumbnails per row:

The above uses the shortcode:

[gallery type='zenfolio' view='photosets' text='wildlife' sort_order='Popularity' limit=25 columns=5 photoset_type='Gallery'] 

Photoset Searches by Category (🔗)

To search for a photoset by category, pass the category_code parameter to it:

[gallery type='zenfolio' view='photosets' photoset_type='Collection' category_code='...'] 

How do you get the category_code? You can go to Photonic → Helpers → Zenfolio → Zenfolio Categories, and list out all the available categories. Pick the one that you need. With effect from version 2.00 you will not require the “Helpers” if you use the “Add / Edit Photonic Gallery” button to insert your gallery.

The following are the most popular photosets in the category “Wildlife” (category code 1018000):

The above uses the shortcode:

[gallery type='zenfolio' view='photosets' photoset_type='Collection' category_code='1018000' sort_order='Popularity']

For category-based searches you cannot specify Rank in your sort order – Popularity and Date are the only available options.

To display the most popular photos or the most recent photos, use the kind parameter and pass to it the values popular or recent. So:

[gallery type='zenfolio' view='photosets' photoset_type='Collection' kind='recent'] 

I am not showing a working example of photos from the above because of the adult nature of some photos.

Miscellaneous Parameters (🔗)

The following miscellaneous parameters can be used whenever multiple results are going to be returned:

  • limit – Shows a certain number of results. The default is 20.
  • columns – Number of thumbnails per row. The default is auto, so the plugin tries to arrange thumbnails one after another till a row is full.
  • thumb_size – This is the size of displayed thumbnails. This can take the following values:
    • 0 – Small thumbnail, upto 80 × 80px
    • 1 – Square thumbnail, 60 × 60px, cropped square
    • 10 – Medium thumbnail, upto 120 × 120px
    • 11 – Large thumbnail, upto 120 × 120px
    • 2 – Small image, upto 400 × 400px