Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

Tags Addon

Share This Post!

The Tags Addon for Envira Gallery allows you to display a list of tags above your Envira Gallery, which visitors can select to filter the gallery view, displaying only the images assigned to the chosen tag.

  1. Requirements
  2. Installation
  3. Setup

Requirements

Installation

Please follow our instructions on how to install and activate addons.

In this instance, you’ll be activating the Envira Tags Addon.

Setup

 

Manual Tagging

Choose your Envira Gallery that you want to enable tag filtering for. In the Images tab, select the pencil icon on the top of the thumbnail image to edit that image’s metadata.

Select the pencil icon for an image in your gallery to add tags.

You will then see the image’s Edit Metadata window. Scroll to the bottom of the window and follow the instructions on adding tags to your image.

Add tags to individual images in your gallery through the Edit Metadata lightbox.

Once you add your tags, select the Save Metadata button and repeat the process for all the images in your gallery. Alternatively, you can bulk-add tags to images in the same gallery.

Next, select the Tags tab of your gallery to enable tag filtering for your gallery.

Configure your gallery's tag filtering options in the Tags tab.

Enable Tag Filtering for your gallery, then Publish or Update your gallery. Add your gallery to a post or page if you have not yet done so, then view to see tag filtering in action!

When tag filtering is enabled, your gallery's available tags will appear above the gallery images.

Select a tag from above the gallery images to filter your gallery.

Select a tag to filter your gallery images.

Great work, you’ve learned how to add gallery tags in WordPress using Envira Gallery!

 

Auto Tagging with Imagga

Envira also allows you to auto-tag images using the Imagga image tagging service.

In the WordPress admin, navigate to Envira > Settings > Tags. Here you’ll see options to enable, connect to your Imagga account and configure the Minimum Confidence percentage. Go ahead and enable Auto Tagging in this screen to get started:

Enable Imagga to begin auto-tagging your gallery images.

Next, create an account at Imagga. They provide a generous free tier to get started. Once you’ve confirmed your account, copy the Authorization Code from your Imagga Dashboard:

Imagga dashboard authorization code.

Return to the WordPress Admin and paste the code into the Imagga Authorization Code field.

Enter your Imagga Authorization Code to connect Envira to Imagga for auto-tagging gallery images.

You can also specify a Minimum Confidence percentage. If specified, only adds tags to images where Imagga matches or exceeds the above confidence percentage rating. A lower confidence means it is more likely less accurate tags will be included in an image. The default value is 40%, raise or lower this based on your own specific needs.

Set the minimum confidence level for your Imagga settings.

Save the changes to begin auto-tagging images.

To finish connecting Envira to Imagga, select the Save button.

Imagga auto-tagging is not applied to images already present in your galleries, so to see it in action you’ll need to upload or add some images from the Media Library to an existing or new gallery.

Once you add an image, if Imagga can determine the image’s content it will automatically apply relevant tag(s) without you lifting a finger. In the edit screen, after adding images to your gallery select the blue i button at the top of the thumbnail image to open the ‘Edit Item’ lightbox. Here you can see any tag(s) automatically applied to the gallery image(s).

Imagga Auto Tagged Image

That’s it! You’ve successfully configured auto-tagging for your galleries!


FAQs

Q: Can I bulk-add tags to my gallery images?

A: Yes! To bulk-add tags to gallery images, first select the images from the Images tab you want to bulk-add tags to then select the Edit Selected Images button.

To bulk edit your gallery images, the Bulk Edit Images button will appear once you've selected one or more images.

A lightbox will appear where you can add a comma-separated list of tags you want to add to all selected images, then select the Save Metadata button to apply the changes to the images you selected in your gallery.

Add the tags in the Edit Metadata lightbox for the images you've selected to bulk edit, then save to apply the changes.


Q: How do I manage existing tag names and slugs?

A: You can navigate to the Envira Gallery > Tags screen to manage your tags.

You can manage your tags by navigating to the Tags screen from the Envira menu tree.


Q: Can I customize the appearance of the tag filter links?

A: Yes! You can use the following CSS selectors to target the tag filter links and style with your own custom CSS as desired:


Q: Can I create a gallery populated by images with specific tags?

A: Yes! Using the Dynamic Addon you can display a tag-based dynamic gallery.


Q: When adding images from the Media Library, can I filter by Tag(s)?

A: Yes! Follow our documentation to learn how to filter by Envira Tags in the WordPress Insert Media View.


Q: I don’t see the smooth transition on filtering the images, why?

A: In order to receive the smooth transition, you must make sure you have enabled the ‘Isotope’ setting from the Config tab of the gallery. If ‘Isotope’ is disabled (un-checked), you will notice selecting a tag to filter your gallery will result in a page reload each time you filter the gallery.

enable-isotope-tags

Another reason could be that on the Config tab of the gallery you have selected the ‘Automatic’ layout for the Number of Gallery Columns. The smooth transition is only used (currently) in the Column layout (1, 2, 3, 4, 5 or 6 columns).

automatic


Q: Why do I not see all of my tags in the list?

A: The tags you’ve included in the section for ‘Tags to include for Filtering’ will be the only tags populating the list.

Tags to include in your filter


Q: Why does my manual sort for the order not show the order I’ve set up?

A: Please check how you are including your tags. If you are using the ‘Tags to include in Filtering’ option – this is the order that your tags will appear in:

sort order for tags addon


Q: Why am I not seeing all of the tags showing in the filter?

A: Please check to make sure your Envira tags and your Envira Categories are not using the same name. All gallery titles, album titles, Envira Tags and Envira categories should have unique names. If you notice any issues please edit the names and their slugs or permalinks to make it specifically unique and then go to Settings » Permalinks and click Save to update WordPress a change was made.


Configuration Options

This table describes the available configuration options for your Envira Galleries when using this Addon.

The Programmatic Name and Programmatic Values columns are used when configuring the Dynamic Addon’s shortcode or template tag, or when overriding the default settings for creating a new Gallery.

Config Item Description Options Programmatic Name Programmatic Values
Enable Tag Filtering? Enables or disables tag filtering for the gallery display. 0,1 tags 0,1
Tags Position? Define where you would like the tags displayed – above or below the gallery images. Above Images
Below Images
tags_position above
below
Tags to include in Filtering Optionally define which tags to display. If none are set, the list of tags will be automatically generated based on the image tags. Comma-separated list of tag slugs. String tags_filter String
Number of Images Limit the number of images to display when using the Dynamic Addon. Zero = all images will be displayed. Integer tags_limit Integer
All Tags Label The label to display for the All Tags link. String tags_limit String

Developers

Filters

FileFilter NameArguments
/includes/global/common.php
 envira_tags_sorting_optionsapply_filters( 'envira_tags_sorting_options', $options )
 envira_tags_position_optionsapply_filters( 'envira_tags_position_options', $options )
/includes/global/shortcode.php
 envira_tags_custom_gallery_dataapply_filters( 'envira_tags_custom_gallery_data', $data, $atts, $post, $tags, $config, $id )
 envira_tags_to_filterapply_filters( 'envira_tags_to_filter', $tags, $data )
 envira_tags_filter_linksapply_filters( 'envira_tags_filter_links', $gallery, $data )
 envira_tags_item_dataapply_filters( 'envira_tags_item_data', $item, $id, $data, $i )
 envira_tags_filter_classesapply_filters( 'envira_tags_filter_classes', $classes, $item, $i, $data )
 envira_tags_get_gallery_by_tagsapply_filters( 'envira_tags_get_gallery_by_tags', $data, $config, $tags_id )
 envira_tags_gallery_tagsapply_filters( 'envira_tags_gallery_tags', array_unique( $tags )
 envira_tags_filter_markupapply_filters( 'envira_tags_filter_markup', $markup, $tags, $data )
 envira_tags_custom_album_dataapply_filters( 'envira_tags_custom_album_data', $data, $atts, $post, $tags, $config, $id )
 envira_tags_album_filter_linksapply_filters( 'envira_tags_album_filter_links', $album, $data )
 envira_tags_albums_item_dataapply_filters( 'envira_tags_albums_item_data', $item, $id, $data, $i )
 envira_tags_albums_filter_classesapply_filters( 'envira_tags_albums_filter_classes', $classes, $item, $i, $data )
 envira_tags_album_tagsapply_filters( 'envira_tags_album_tags', array_unique( $tags )
 envira_tags_album_filter_markupapply_filters( 'envira_tags_album_filter_markup', $markup, $tags, $data )
/includes/global/taxonomy.php
 envira_tags_taxonomy_labelsapply_filters( 'envira_tags_taxonomy_labels', $labels )
 envira_tags_taxonomy_argsapply_filters( 'envira_tags_taxonomy_args', $args )
 envira_tags_category_taxonomy_labelsapply_filters( 'envira_tags_category_taxonomy_labels', $labels )
 envira_tags_category_taxonomy_argsapply_filters( 'envira_tags_category_taxonomy_args', $args )

Actions

FileAction NameArguments
/includes/global/shortcode.php
 envira_gallery_api_enviratope_configdo_action( 'envira_gallery_api_enviratope_config', $data )
 envira_albums_api_enviratope_configdo_action( 'envira_albums_api_enviratope_config', $data )
/includes/admin/settings.php
 envira_gallery_settings_tags_tab_noticedo_action( 'envira_gallery_settings_tags_tab_notice' )
/includes/admin/ajax.php
 envira_tags_ajax_load_imagedo_action( 'envira_tags_ajax_load_image', $attachment_id, $post_id )
 envira_tags_ajax_insert_imagesdo_action( 'envira_tags_ajax_insert_images', $images, $post_id )
/includes/admin/metaboxes.php
 envira_tags_tag_boxdo_action( 'envira_tags_tag_box', $post )

Changelog

1.4.7 (03-08-2017)

  • Fix: Tags to include for filtering and manual sort compatibility.

1.4.6 (02-15-2017)

  • Fix: All tags output class
  • Fix: Minor bug fixes

1.4.5 (02-01-2017)

  • Fix: Albums not sorting
  • Fix: Minor bug fixes

1.4.4 (01-19-2017)

  • Fix: Minor bug fixes

1.4.3 (2016-12-08)

  • Fix: Dynamic Compatibility
  • Fix: Minor bug fixes

1.4.2.6 (2016-12-08)

  • Fix: All tag always has active class

1.4.2.5 (2016-11-03)

  • Fix: Various minor bugs.

1.4.2.4 (2016-10-04)

  • Fix: Ensure manual sort saving the changes when altered for albums and galleries.

1.4.2.3 (2016-08-25)

  • Fix: "&" character no longer causes tags to not appear.

1.4.2.2 (2016-07-26)

  • Fix: Minimum Confidence setting now saves properly.

1.4.2.1 (2016-07-01)

  • Fix: Remove debugging code from album output to prevent errors.

1.4.2 (2016-06-30)

  • Fix: Category tags should save properly for albums.
  • Update: Removed redudant category metabox in right sidebar on ablums when tag addon is activated.

1.4.1 (2016-05-12)

  • Added: Option to enable or disable All tag
  • Added: Option to only display images with specified tag on load
  • Added: Option to filter Album Galleries by Category
  • Fix: Ensure image tags are included in Envira Gallery export files

1.4.0 (2016-05-05)

  • Updated: Standardised edit screen titles and descriptions

1.3.9 (2016-04-28)

  • Fix: Output tags within the Envira Gallery container, so they can be better managed by CSS, JS and other Addons, such as Pagination.

1.3.8 (2016-04-21)

  • Updated: Spanish translation

1.3.7 (2016-04-16)

  • Fix: Prevent success / error notices on Settings screen from jumping

1.3.6 (2016-03-31)

  • Added: Documentation and Video Help Links
  • Updated: Moved image editing modal descriptions inline with fields

1.3.5 (2016-03-10)

  • Fix: Scroll to Gallery anchor changed so tags are not sometimes hidden
  • Fix: Get Term by Name and output slug in gallery image class so JS filtering works correctly
  • Updated: Spanish Translations

1.3.4 (2016-03-03)

  • Added: Tags are stored against an image when uploaded from Lightroom (requires Adobe Lightroom 1.0.1.0+; Envira Lightroom Addon 1.0.3+)
  • Fix: Tags displaying slug instead of name
  • Fix: Non-JS tag filtering URLs failed to use slug correctly

1.3.3 (2016-02-25)

  • Added: Sort tag filters option
  • Added: Manually define tag filter display order

1.3.2 (2016-02-18)

  • Added: Option to scroll to gallery when tag clicked

1.3.1 (2016-02-11)

  • Added: Automatically tag images using the Imagga API
  • Added: tags=“*” will output a Gallery comprising of all tagged images
  • Fix: No longer require the tags_id element on shortcodes; require the ID parameter. This standardises shortcode syntax to follow all Envira Addons.
  • Fix: Clear caches on all tag-based galleries on image tag change to ensure all relevant tagged images are displayed

1.3.0.1 (2016-02-08)

  • Fix: envira_tags_get_gallery_by_tags() error

1.3.0 (2016-02-04)

  • Added: Restructured plugin to use classes and singletons per other Envira Addons
  • Added: Filter images in Media Library view by Envira Tag
  • Fix: Renamed ‘Tags’ to ‘Envira Tags’ so it’s easier to distinguish in third party plugins between Post Tags and Envira Tags

1.2.5 (2015-12-31)

  • Added: Support for new Envira Gallery 1.4.1.0+ meta editor

1.2.4 (2015-12-23)

  • Updated: Spanish translations

1.2.3 (2015-12-10)

  • Updated: Spanish Translation
  • Fix: Ensure all strings are localized for translation

1.2.2 (2015-11-26)

  • Added: Spanish translation.
  • Fix: Ensure Tags appear alphabetically on front-end output to match backend output when "Tags to include in Filtering" are defined.

1.2.1 (2015-11-06)

  • Fix: Tag filtering works when multiple Galleries embedded on a single Page.

1.2.0 (2015-10-29)

  • Fix: Unexpected end of input JS error when using Albums.

1.1.9 (2015-10-14)

  • Added: Add tags to multiple images (requires Envira Gallery 1.3.7+)

1.1.8 (2015-09-24)

  • Added: Abstracted transient expiration

1.1.7 (2015-07-30)

  • Added: Ability to define tag label

1.1.6 (2015-07-23)

  • Added: Most Popular Tags below Tag Inputs

1.1.5

  • Added: Number of Images Limit support for Dynamic Addon

1.1.4

  • Added: Tags Addon actions when a new image is uploaded or selected for insertion into a Gallery.
  • Fix: Tag filtering by slug when AJAX / JS not used.

1.1.3

  • Added: Better actions and filters on taxonomies for easier documentation

1.1.2

  • Added: Generate galleries with images matching all specified tags or any specified tag(s)

1.1.1

  • Added: Non-Javascript support for filtering a Gallery by Tag

1.1.0

  • Added: Tags Tab in WordPress Admin UI when editing a Gallery
  • Added: CSS for general markup now in main Envira Gallery CSS for better accessibility
  • Added: Support for outputting Envira EXIF Make/Manufacturer tags
  • Added: Generate a dynamic gallery by image tag across all Envira Galleries (requires Envira Dynamic 1.0+)

1.0.9

  • Fixed: Ability to choose which tags appear for the tag filtering

1.0.8

  • Added: Misc tab - ability to choose which tags appear for the tag filtering

1.0.7

  • Fix: Support for Envira Gallery 1.3.0 and higher with Isotope v2

1.0.6

  • Fix: Tag filtering on Envira shortcode re-enabled

1.0.5

  • Full localization support with .pot files.
  • All tags now moved to custom taxonomy for better query support (and eventual support for popular tags and building galleries by tag).

1.0.4

  • Removed leftover logging utility from the addon.

1.0.3

  • Updated to reflect new namespacing for Envira.

1.0.2

  • Fixed bug causing tags not to be saved.

1.0.1

  • Fixed bug that caused tag filtering to always be turned on.

1.0.0

  • Initial release of the addon.
Share This Post!