[downloads]

You can easily output a list or grid of downloadable products using the [downloads] short code. This short code accepts a variety of parameters that allow you to specify what downloads are displayed, and how they are displayed.

To show downloads with the default configuration, use this:

[downloads]

This will output the downloads in a three column grid with thumbnails (if present), a 30 word excerpt, and a purchase button that says "Add to Cart".

If you wish to modify this output, here is a list of the parameters:

  • category
  • exclude_category
  • tags
  • exclude_tags
  • relation
  • number
  • price
  • excerpt
  • full_content
  • buy_button
  • columns
  • thumbnails
  • orderby
  • order
  • ids

Both the  category and tags parameters accept a comma separated list of slugs or IDs. For example:

[downloads category="14,themes" tags="WordPress,SEO"]

The  exclude_category and exclude_tags parameters are used to prevent downloads with specific categories or tags from being displayed. Use a comma separated list of slugs for each.

The  order parameter accepts either "DESC" or "ASC".

The  orderby parameter accepts the following options:

  • price
  • id
  • random
  • post_date
  • title

The  number and columns parameters accept a numerical value. Specify the maximum number of downloads you want to outputted by the shortcode, as well as the number of columns. For example:

[downloads number="15" columns="3"]

The  relation option is for specifying whether the downloads displayed have to be in ALL the categories/tags provided, or just in at least one. Use "AND" for showing downloads that are filed in every category/tag (very specific), and use "OR" for showing downloads filed in any of the given categories / tags. Leave both of these blank to show all downloads.

Price, excerpt, full_content and buy_button accept "yes" or "no".

The  thumbnails parameter requires "true" or "false".

The  ids parameter accepts specific download IDs. You can specify multiple download IDs using comma separated values. For example:

[downloads ids="3,4,17"]

Example:

[downloads category="plugins,themes" number="10" columns="2"]