Documentation

Brand: Twinpictures Plugin Oven | Category: WordPress Plugin | Updated: 16 December, 2015

Shortcode

It is highly recommend to use WordPress’ HTML editor when working with shortcodes on a post or page. The Visual editor in WordPress tends to ‘sanitize’ shortcodes, producing undesired results.

Use the [list-related-attach] shortcode to create a list of related attachments. Lists can further defined by assigning the following attributes to the shortcode:

Type Attribute

Use the type attribute to assign the mime/type of the attachments that is to be displayed.
[list-related-attach type="application/zip"]

Default: application/

Show Attribute

Use the show attribute to display the ‘title’, ‘caption’ or ‘description’ of the attachment. As of version 1.7 multiple attachment elements can be displayed.
[list-related-attach show="caption (title)"]

Default: title

Count Attribute

Want to display only three items? Well then the count attribute is what you need. Use a count value of “-1” to display all available attachments.
[list-related-attach show="caption" count="3"]

Default: -1

Orderby Attribute

Lists can be ordered by author, title date and many other variables. Multiple values can be used, as shown in the example below. Visit the complete list of accepted orderby values at the WP_Query Class Codex on WordPress.org
[list-related-attach show="caption" orderby="title date"]

Default: date

Orderby Attribute

When it comes to ordering a list, it is a known fact that list can be sorted both ascending (small to large) or descending (large to small). For more detail on this fascinating subject, visit the Order & Orderby Parameters on WordPress.org. It really is an exciting read.
[list-related-attach show="caption" order="ASC"]

Default: DESC

Link To Attribute

Use the link_to attribute to have the attachment link to either the file (default) or the attachment page
[list-related-attach type="image/jpeg" link_to="attachment_page"]

Default: file

Parent ID Attribute

By default attachments that are related to the current page will be shown. This can be overridden by using the parent_id attribute.
[list-related-attach type="image/" parent_id="163"]