Det här tillägget har inte testats med någon av de 3 senaste huvudversionerna av WordPress. Det kanske inte längre underhålls och kan ha kompatibilitetsproblem när det används tillsammans med nyare versioner av WordPress.

PhotoPress – Gallery

Beskrivning

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.

Features Include:

  • 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.

Premiumsupport

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.

Example Usage

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:

[gallery caption_source="none"]

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:

  1. post_gallery_attachments – can be used ot filter the list of Post objects that the gallery shortcode will pull its images from.
  2. post_gallery_styles – can be used ot append/prepend/replace the inline style generated by the gallery shortcode
  3. post_gallery_pre_output – can be used to prepend HTML to the gallery markup. Handy for wrapping the gallery in a container.
  4. post_gallery_caption – can be used to filter the caption text used by the gallery
  5. post_gallery_post_output – can be used to append HTML to the gallery markup. Handy for adding a closing tag or addtional dom elements

Skärmdumpar

  • Taxonomy and Term Shortcode Usage

Installation

  1. Upload the photopress-galleries plugin folder to your /wp-content/plugins/ directory
  2. Activate the plugin through the ’Plugins’ menu in WordPress
  3. Add parameters to the gallery shortcode in your page/post like so [gallery taxonomy=photos_city term=yosemite]. (see screenshot)

Vanliga frågor

Installation Instructions
  1. Upload the photopress-galleries plugin folder to your /wp-content/plugins/ directory
  2. Activate the plugin through the ’Plugins’ menu in WordPress
  3. Add parameters to the gallery shortcode in your page/post like so [gallery taxonomy=photos_city term=yosemite]. (see screenshot)
Why do I need this plugin?

There are a few reasons:

  1. You want to create dynamic galleries that contain images which match taxonomy meta data you have associated with your images.
  2. You want to create a ”gallery of galleries” by display the featured images of specific Pages or Posts.
  3. You want per gallery control over image captions and the source of the text used
  4. 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.

Recensioner

Detta tillägg har inga recensioner.

Bidragsgivare och utvecklare

”PhotoPress – Gallery” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

Översätt ”PhotoPress – Gallery” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

1.8

removing srcset attribute from gallery thumbnail/icons to prevent browsers from needlessly downloading larger versions of the image.

1.7

Added gallery_item_class, gallery_item_properties, gallery_icon_class, gallery_icon_properties, gallery_caption_class, and gallery_caption_properties filters.

1.6

Bug fixes

1.5

  • Fixes bug that could cause a taxonomy gallery to be empty

1.4

  • 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

1.3

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.

1.2

Changed plugin priority to 99 so that other gallery filters do not take over.

1.1

Adding support for WP 3.5

1.0

Initial version of plugin.