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.
[list-related-attach] shortcode to create a list of related attachments. Lists can further defined by assigning the following attributes to the shortcode:
Use the type attribute to assign the mime/type of the attachments that is to be displayed.
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)"]
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"]
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"]
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"]
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"]