Slice down galleries on archive pages to preview-only, with link to load full gallery via Ajax
|Author:||Honza Skypala (profile at wordpress.org)|
|WordPress version required:||3.9|
|WordPress version tested:||4.6.21|
|Added to WordPress repository:||17-05-2014|
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|Total downloads:||3 511|
Click to start download
The standard gallery in WordPress has one limitation — it always shows all the pictures in the gallery. I know there are alternative galleries available, which support pagination, but I never thought this is a good approach. The reader never wants to see n-th page of the gallery — if the first page got his attention, then he wants to see all of the rest, not split into pages anymore. At least, this is how I see it.
So, if you run a blog, on which you publish huge galleries with many many many pictures, maybe you want to show only preview of the gallery on archive pages (homepage, categories, archives etc.), so the individual posts are not too long. The gallery-preview then contains a link, which loads the rest of the gallery if the reader wishes so, via Ajax. Well, this plugin brings exactly that, all with standard WordPress gallery.
Single posts are untouched, they still show full galleries, at least for now.
You can reach similar functionality just by creating two galleries and putting the <!–more–> tag in between them — and the archive page shows only the first gallery, while single post shows the whole gallery. But, this plugin has several advantages: it can be set and forget, and then the plugin automatically applies it for every post/gallery published. If the gallery is followed by another text, then this text is still displayed on the archives page. Loading of the rest of gallery is handled by Ajax (with fallback to single-post URL if Ajax fails).
In options, you specify two values: first one threshold — amount of images, if the gallery exceeds this many, it is sliced into a preview. This is the second value, how many images should be shown in a preview. This allows to have 2 different values for that, e.g. 9 images for preview, but 12 images for threshold, which makes some flexibility, that if the gallery is 10 images big, then it is not shortening by jsut one image. Anyway, you can also specify the same values, if you wish.
These two values are specified on three levels: global (per blog), per post and per gallery tag. You can also specify not to slice a gallery in specific post, resp. not to slice a specific gallery.
Plugin supports several lightbox implementations.
WTFPL License 2.0 applies
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <firstname.lastname@example.org> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.<h3>ToDo's</h3>* enable plugin to work in opposite manner - do not automatically slice down galleries, but only on posts / tags where the downto attr is set
* re-check WP-Minify on possibility to use the compiled JS files (internal)
* enable slicing w/ Ajax loading on single posts
Gallery of many pictures sliced-down to only 9 thumbnails. Link "Full gallery →" added via which the user can get the rest of gallery, using Ajax
You can specify the options on three levels — globally, per post or even per individual gallery.
For global options, please go to Settings → Media, section Gallery Slice
For per post options, when you create a new post, there will be a new block Gallery Slice, usually displayed in the bottom right. The settings you specify here apply only to the actual post, not to the other ones.
For specifying options per individual gallery, you use new attributes in the gallery shortcode:
- sliceto — the amount of thumbnails, to which the gallery should be sliced to
- noslice — do not slice down this gallery (even if threshold reached). Attribute without value
- link2full — text for the hyperlink to load rest of the gallery
- Bug-fixes and warning-fixes
- Fix for compatibility with PHP 5.3
- Support for slicing of galleries created by my other plugin rajce-embed
- Loading animation option integrated with WordPress Media Library
- Added some missing strings to i18n
- Smaller fixes and optimizations
- Loading animation added; user can specify his own loading gif in the options
- Initial release