This plugin adds a variety of additional features to the core gallery shortcode that expand the options for specifying which images should be included in the gallery including the ability to create dynamic galleries of images that match a specific taxonomy “term”. This is particularly useful when used in conjunction with the PhotoPress – Image Taxonomies plugin which allows you to easily associate a wide variety of custom meta data with images.
Also, the plugin can be used to create gallery containing with the featured images of any Pages/Posts (even custom post types) that you specify. This is particularly useful when creating a “Gallery of Galleries” or any grouping of Posts that you want to be styled like your other galleries.
- Adds “taxonomy” and “term” gallery shortcode parameters.
- Adds “caption_source” parameter so that you can choose the source of text for your caption. Possible values are: “excerpt” (default), “title” (which pulls from the title), “none” (if you want no caption text).
- Adds “post_type” parameter for use in creating galleries of post types other than “image attachments”. This parameter accepts any valid post type (e.g. “post”, “page”, etc.) including custom post types. If you use a post type other than ‘attachment’ then the featured image of the post will be used as the image icon in the gallery. This parameter can be combined with the “taxonomy” and “term” parameters as well.
- Adds six backwards compatible filters to the core gallery shortcode allowing plugin developers to control almost every aspect of the gallery HTML and CSS on a per gallery basis.
The PhotoPress team does not provide support for this plugin on the WordPress.org forums. One on one email support is available to users that purchase one of our Premium Support Plans.
The Guide To WordPress For Photographers
For more information on ways to use PhotoPress and other plugins to build a photpgraphy website check out the WordPress For Photographers e-Book.
Display a gallery of images from an image taxonomy called “photo_keywords” that match a taxonomy term called “flower”:
[gallery taxonomy="photo_keywords" term="flowers"]
Display a gallery of of images with no captions:
Display a gallery of the featured images from a specific set of pages:
[gallery post_type="page" ids="123,456,789"]
Display a gallery of the featured images from the child posts of a specific page:
[gallery post_type="page" id="123"]
Display a gallery of the featured images from a specific set of posts that use a custom post type:
[gallery post_type="my_custom_post_type" ids="123,456,789"]<h3>Developer Documentation</h3>
Please read the inline code documentation for more details.
List of Gallery related filters this plugin implements:
post_gallery_attachments– can be used ot filter the list of Post objects that the gallery shortcode will pull its images from.
post_gallery_styles– can be used ot append/prepend/replace the inline style generated by the gallery shortcode
post_gallery_pre_output– can be used to prepend HTML to the gallery markup. Handy for wrapping the gallery in a container.
post_gallery_caption– can be used to filter the caption text used by the gallery
post_gallery_post_output– can be used to append HTML to the gallery markup. Handy for adding a closing tag or addtional dom elements
- Why do I need this plugin?
There are a few reasons:
- You want to create dynamic galleries that contain images which match taxonomy meta data you have associated with your images.
- You want to create a “gallery of galleries” by display the featured images of specific Pages or Posts.
- You want per gallery control over image captions and the source of the text used
- You want to create a gallery that contains the featured images of pages or custom post types without having to resort to add/modify templates in your theme.
- How do I associate terms with images?
You would need to register a custom taxonomy for attachments/images or you could just use the PhotoPress – Image Taxonomies plugin.
- What happens if I deactivate this plugin
If you are using the taxonomy and term shortcode params, then your galleries will no longer display images.
If you are using the caption_source param then WordPress wil revert to using the excerpt as the source of the cpation text.
if You are using the post_type param then your gallery will no longer display images.
Added gallery_item_class, gallery_item_properties, gallery_icon_class, gallery_icon_properties, gallery_caption_class, and gallery_caption_properties filters.
- Fixes bug that could cause a taxonomy gallery to be empty
- Adds “caption_source” shortcode parameter.
- Adds “post_type” shortcode parameter
- Removing support for include_order as WordPress now supports that functionality by default in core
Removing support for pre WP 3.5 ‘include-order’ shortcode param now that 3.5 supports explicit ordering of images when using the ‘include’ or ‘ids’ shortcode params.
Fixed bug in column generation code.
Changed plugin priority to 99 so that other gallery filters do not take over.
Adding support for WP 3.5
Initial version of plugin.
Contributors & Developers
PhotoPress – Gallery is open source software. The following people have contributed to this plugin.Contributors