Main Menu
Sub Menu

[wpdm_packages] – WP_Query in a shortcode for download manager packages

Use this shortcode you can query all downloads/packages, and you can use relevant parameters as like as WP_Query as mentioned below You may also use Gutenberg Block instead of writing this shortcode, you will have the visual option to configure each parameter.

Get the WPDM Gutenberg Block plugin

Example short-code to query any author's downloads:

[wpdm_packages author="1" login="1" paging="1" orderby="field name" order="asc or desc" items_per_page="10" template="Link Template ID" cols=4 colspad=2 colsphone=1]


Authentication Parameter

  • login (int) - optional, valid value is0 or 1. You can skip this parameter, but if you use login=1, the shortcode will show a login for the visitors who are not logged in.

UI Parameters

  • toolbar (int) - optional, valid value is0 or 1, show to hide toolbar, default value 1
  • title (string) - optional, can be used to add custom title
  • desc (string) - optional, can be used to add a custom description
  • icon (url) - optional, can be used to add a custom icon URL
  • icon_wdith (int) - optional, controls the icon width
  • async (int) - optional, valid value is0 or 1,  load pagination links asynchronously when set 1

Author Parameters

Show posts associated with a certain author.

  • author (int | string) - use author id or comma-separated list of IDs, exclude an author by prefixing its id with a  - sign, like -1.
  • author_name (string) - use 'user_nicename' - NOT name.

Category Parameters

Show posts associated with specific categories.

  • categories (string) - use category slug or id or name ( multiple categories should be separated by comma ).
  • include_children (int - 0 or 1 ) – Whether or not to include children
  • operator (string) – Operator to test. Possible values are INAND. The default value is IN.
  • cat_field (string) - Name of the field you are using the value of the categories parameter. Possible value is term_id or slug or name, the default value is slug
  • xcats (string) - To exclude the given categories, the value should be category slug, multiple slugs are separated by commas

Custom Taxonomy Parameters

You can filter packages by custom taxonomy terms

  • tax (string) - taxonomy name, multiple taxonomy name separated by a vertical bar, ex: tax1|tax2
  • terms - term id, multiple ids should be separated by a comma, terms groups of multiple taxonomies should be separated by a vertical bar, ex: tax1-term1,tax1-term2|tax2-term1,tax2-term2

Tag Parameters

Show posts associated with certain tags.

  • tags (string) - use tag slug.
  • tag_id (int) - use tag id.
  • tag__and (array) - use tag ids.
  • tag__in (array) - use tag ids.
  • tag__not_in (array) - use tag ids.
  • tag_slug__and (array) - use tag slugs.
  • tag_slug__in (array) - use tag slugs.

Other Parameters

We are adding support for all WP_Query parameters, so far, it also supports the following parameters

  • post__in
  • post__not_in
  • author
  • author_name
  • author__not_in
  • day
  • week
  • month
  • year

Live Demo

Last updated on Nov 5, 2021

Need More Clarification?

For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.

Need Customization?

If you need additional customization on WordPress Download Manager or any type of custom support on WordPress you may contact our customization service.