Display a list list of collections

You can show a list if collection by using the [picu_list_collections] shortcode.

By default – when no attributes are used – it shows a list of all sent collections, which are currently awaiting approval.

Please note, that collections sent to multiple recipients will only be listed, if the email attribute is specified and the email address matches one of the recipients.

List of Attributes

status
Filter by collection status. Accepts a comma-separated list of collection status. Allowed values: open, closed and delivered. Defaults to “open”, if the filter is not used.

[picu_list_collections status="open,closed"]

ids
Filter by collection ID. Accepts a comma-separated list of ids.

[picu_list_collections id="123,456"]

email
Filter by email address, which the collection was sent to. Accepts one email address.

[picu_list_collections email="info@picu.io"]

current_user
Filter by the email address of the currently logged in user.
Note: This will overwrite the email attribute.

[picu_list_collections current_user]

The example above will show all collections, which were sent to the currently logged in user, matched by the user’s email address.


For the developers among you, we also added a filter picu_list_collections_args, which let’s you change/add your own arguments to the underlying query. In the following example we want to order the collections by title (by default they are sorted by date):

function my_picu_list_collection_args( $args ) {

	$args['orderby'] = 'title';

	return $args;
}

add_filter( 'picu_list_collections_args', 'my_picu_list_collection_args' );

This works with all the parameters used by WP_Query and opens up a whole range of possibilities.

We have a second filter, picu_collection_list in place with which you can completely customize the collection list.

Have a look at this example snippet that allows you to use a random image from the respective collection as a thumbnail.


And finally, there is also a blog post describing how to implement a very basic client area.

Still having issues?

In your WordPress Admin go to picu > Settings > Debug Info and send the contents of this page and your questions to support@picu.io.