Picasso

WordPress already has phenomenal, built-in support for image galleries, and theme developers are starting to take full advantage of these features. Moreover, Otto has done a great job describing the functionality, and how to take full advantage of these built in features (if your theme is lacking). However, one of the features missing is an easy to way create albums (a container for galleries). Picasso aims to solve this problem by introducing a new [album] short-code. It works by grabbing the featured image of child pages, and linking each image to its respective page. Thus, the parent page becomes the album, and each child page is a gallery.

Options

columns – specify the number of columns. The gallery will include a break tag at the end of each row, and calculate the column width as appropriate. The default value is 3. If columns is set to 0, no row breaks will be included. For example, to display a 4 column gallery

[code]album columns="4"[/code]

orderby – specify the item used to sort the display thumbnails. The default is “menu_order”. “RAND” (random) is also supported.

order – specify the sort order used to display thumbnails. ASC or DESC. For example, to short by ID, DESC:

[code]album order="DESC" orderby="ID"[/code]

itemtag – the name of the XHTML tag used to enclose each item in the gallery. The default is “dl”.

icontag – the name of the XHTML tag used to enclose each thumbnail icon in the gallery. The default is “dt”.

captiontag – the name of the XHTML tag used to enclose each caption. The default is “dd”. For example, to change the gallery markup to use div, span and p tags:

[code]album itemtag="div" icontag="span" captiontag="p" link="file"[/code]

title – specify whether or not to show the gallery’s title under the album picture. The default is “no”. To specify titles:

[code]album title="yes"[/code]

FAQ

How to I create an album?
Create a page, and use the [album] short-code. Be sure all your galleries use this page as their parent.

I can’t seem to set the featured image on my pages or posts.
You need to explicitly add support by appending add_theme_support( 'post-thumbnails' ); to your functions.php file.

Support

Please report any problems or comments below

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.


9 Responses to “Picasso”

  1. Henriette

    HI John

    I suppose you use this plug-in on your ‘advnts’ page – which makes me very interrested in this plug-in, but don’t know how to make it work :)
    where do I put the images ?? I have tried to upload them in the wp-media library, erased the wp-code and added your code – that didn’t work :(
    please help :)

    Henriette

    Reply |

    • John

      I use it on http://www.johnciacia.com/gallery/ to add hierarchy to the galleries – are you interested in that or the lightbox effect?

      Reply |

      • Henriette

        hmmm, I’m not sure that I understand your plug-in. Is the main feature using a photo as link? or is it your slideshow also. – I like both :)
        - how does your plug-in works? how to link from photo to album?

        -simpel lightbox you use- did it come with your theme?

        Reply |

        • John

          It works by grabbing the featured image of child pages, and linking each image to its respective page. Thus, the parent page becomes the album, and each child page is a gallery.

          For the lightbox, I use a plugin called “Fancybox”

          Reply |

  2. Li-An

    Very nice idea but how to give a legend to a gallery in an album ?

    Reply |

    • John

      Hi Li-An, thanks for the comment. I’m not sure what you mean by giving a legend to a gallery, can you elaborate?

      Reply |

      • Li-An

        Well, showing a description of each gallery under the galley’s thumbnail.

        Reply |

        • John

          It currently supports titles. You can use [album title="yes"] which will show the title of the gallery the image links to. I will add support for a longer description in the near future.

          Reply |