Documentation > How To Guides > Collections List Block

Collections List Block

Using the Collections List Block

To add a list of collections to a page, post or template (or wherever else blocks can be used), insert the block picu Collections List (picu/collections-list) from the block inserter into the block editor.

Block Settings

There are several settings available to configure which collections should be loaded and displayed.

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

User current user address
Toggling this button will use the email address of the currently logged in user to filter collections.
Note: This will overwrite the email attribute.

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

Status
Filter by collection status. Dropdown to select between: All, Open, Closed and Delivered.
If an email address is set (either manually, or the current user option), this will use the status of the respective email address instead of the whole collection.

Sort By
Define the order in which collections are listed. Dropdown to select between: Date (newest first), Date (oldests first), Title (A-Z), Title (Z-A)


For developers, we added a filter picu_list_collections_args, which let’s you change/add your own arguments to the underlying query.

In the example below 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' );Code language: PHP (php)

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

Need help?

If you couldn’t find what you were looking for and need more assistance, please get in touch with us directly and we’re happy to help.