Images by taxonomy

­

If you wonder what a taxonomy is... It's the common name of keywords like category or tag. They are used to group similar images. Anything not natively found in WordPress is a custom taxonomy, such as shoe type, genre or similar that may only exist on your installation. They are a very powerful way to mark photos that belong together.

Selecting a group of images is the easiest and fastest using taxonomies. So, while WordPress presently lacks album-gallery relationships or even hierarchical galleries, this approach comes closest. Think of categories as albums and tags as galleries. You can create galleries on the fly just by typing words into Justified Image Grid. Let's see how that works.

All photos tagged with Italy

The above example uses the following, generated shortcode (how to use):

[$justified_image_grid preset=17 image_tags=italy]

Having a well-managed library really pays off

If you have lots of photos you should be tagging or categorizing them already. The free plugin called Media Library Assistant helps a lot, especially in bulk-tagging and bulk-categorizing images. Also it's wise to keep image tags and image categories separate from the normal post tags and post categories. MLA plugin does this by creating custom taxonomies that JIG recognizes simply as tags and categories. If you are a photographer and use Lightroom, you can utilize the MLA plugin to import the keywords and other IPTC metadata into the WordPress Media Library. Neat huh? Then you are only 1 step from creating galleries which is as simple as writing a few words.

Blue landscapes

Here the "blue" is the tag and "landscapes" is the category. Just by typing these two words into the plugin we get a nice gallery. There's no need to select these pictures manually. When you upload more blue landscapes, the gallery will grow automatically. Cool!

The above example uses the following, generated shortcode (how to use):

[$justified_image_grid preset=16 image_tags=blue image_categories=landscapes]

Orange flowers

"Orange" is the tag, while "flowers" is the category. It's a very quick way to select some photos from a library of hundreds.

The above example uses the following, generated shortcode (how to use):

[$justified_image_grid preset=3 image_tags=orange image_categories=flowers]

More advanced and/or relationship using custom taxonomy

It's recommended to use custom taxonomies. It's a separate setting where you choose the taxonomy and enter your term(s). A nice trick is to select tags or categories again, to juggle AND/OR relationships. To better illustrate this take a look at this:

Blue OR orange exotic destinations

The colors are tags while "exotic destinations" is the category. If you just list a bunch of tags, they will add more pictures to the pool.

The above example uses the following, generated shortcode (how to use):

[$justified_image_grid aspect_ratio=1.44 image_tags=blue,orange image_categories=exotic-destinations]

Orange road landscapes

"Orange" and "road" are tags here, and one of them is added through custom taxonomy. It'll intersect them and only show roads that are orange. And only from the landscape pictures.

The above example uses the following, generated shortcode (how to use):

[$justified_image_grid preset=4 image_tags=road image_categories=landscapes image_taxonomy=attachment_tag image_tax_term=orange]

How does it work and what are the options?

It's key to have a nicely managed media library for this feature to really shine.
Once you have that you'll be amazed how easy it is to create galleries.

  • A global setting that toggles the ability to add tags and categories to media library images. Nothing is forced that you don't need.
  • Media Library Assistant helps greatly to manage your library, this site uses it too! It's free! Also, optional.
  • Show images that match any of your desired categories.
  • The same, but with tags.
  • Create a gallery based on your terms of a custom taxonomy.
  • When having multiple terms for one setting, they have OR relationship, the gallery is their union.
  • When combining any of these 3 settings, the relationship between them is AND, so they intersect.