Automatically creates a gallery with every images posts have in attachment.
excludeto exclude some attachment posts of the gallery. It works both with posts'id and attachments' pages' id!
nbdetermines how many pictures you want for a gallery page. Default is 20.
colsdetermines how many pictures you want for a row. Default is everything on the same row. Depending of your theme, images should be automatically displayed on a new row when there is no more room on the width.
tagallows to filter posts by tags.
tag="hello,world"will give attachments from posts tagged with
tag="hello world"will give attachments from posts tagged with
categorymakes exactly the same, but for categories. Take care! If you use in the same time the
categoryoption it makes an logical AND between the two.
orderbyshould be one of the following:
rand. See the WordPress get_posts documentation for more information.
[media-library-gallery exclude="12,13,14" nb=20 cols=4 tag="photos" category="holiday" orderby="date" order="DESC"]should display images from posts tagged with
20images a page,
4images a row. Most recent images should be displayed first. And it won't display images related to IDS 12, 13, 14.
You can also call directly the plugin in your template code. Call the
media_library_gallery_library() function and give it the options you want as an array. For instance
media_library_gallery_library(array("nb"=>2, "cols"=>1));. Could be useful to display it in a sidebar!