Short Codes are used to embed single files, file lists or upload forms (Pro) into Posts or Pages.

A shortcode looks like this:
[wpfilebase tag="file" id=2 /]
This would insert the file with the ID 2 using the default file template (see Templates)


Here’s a list of all available shortcode parameters. Note that some parameters are only available for certain tags.

Parameter Name Description
tag (required) Possible values:
form (Pro)
id File ID, Category ID or Embedded Form Tag (Pro)
path Relative File or Category Path (either id or path can be specified, but not both parameters!)
tpl Template Tag. If omitted default templates are used.
sort File Property to sort files. You can sort by the following parameters:file_display_name
Add > prefix to sort descending (< is ascending, by default), e.g: [wpfilebase tag=list sort=">file_size" /] creates a file list where large files come first. You can sort by multiple files, seperate terms by comma (,). Example “>file_hits,<file_name”
showcats 0/1 – To show categories in file lists, files will be grouped by category. Default is 0
sortcats For lists. Property to sort categories by (ignored if showcats=0)cat_name
num Number. Limits the number of files in file lists (when pagenav is enabled, this is the number of files per page)
pagenav 0/1 – Wether to show the page navigation if list is paginated.
linktext For tag=fileurl only. Text for the link.
If linktext is empty or not given, the shortcode will just output the file URL (http://www….com/…/file.pdf). Otherwise it generates a HTML <a> element: <a href=”http://www….com/…/file.pdf”>linktext</a>
search Pro only. Search term to filter files in lists. Only matching files will be displayed.

Files and categories can either be selected by their id [wpfilebase tag=file id=123] or their path [wpfilebase tag=file path=sample_category/myfile.pdf] but not both: [wpfilebase tag=file id=123 path=sample_category/myfile.pdf]


Generates sortable, paginated and searchable file lists.

[wpfilebase tag="list" id={category id} path="{category path}" tpl="{list template tag}" sort="{file_property}" showcats={0/1} sortcats="{cat_property}" num="{page limit}" pagenav="{0/1}" search="{searchterm}" /]

Either the id parameter or path parameter or none of both has to be specified. If none is given all categories are included. To include multiple categories seperate their IDs by comma: [wpfilebase tag="list" id="1,2,3" /]

If tpl is not given, default list template is used.

Default sortings (can be set in WP-Filebase Settings) are used if sorting parameters are omitted.

Use the search parameter to filter the list. Enter any search term like you would do it when you are using the search widget. The search filter includes all file meta data (name, descrtiption tags) and – if enabled – ID3 tags and also indexed keywords of PDF files. See Search


Embeds a single file using default or custom templates.

[wpfilebase tag="file" id={file_id} path="{file path}" tpl="{template tag}" /]

Either the id or the path parameter must be specified. If tpl is not given, default file template is used.

File URL

Inserts a download link for a file.
[wpfilebase tag="fileurl" id={file_id} linktext="{text of the link}" /]
Either the id or the path parameter must be specified. If linktext is set, it generates a hyperlink that links to the file. If not, it just gives out the URL of the file so you can use it in custom <a> tags like:
<a href="[wpfilebase tag=fileurl id={file_id} /]">...Linking text or HTML elements...</a>
Note that you can’t use double quotes ( ” ) when the shortcode is placed inside a HTML attribute like in previous sample. To open files in a new tab, add the target=”_blank” attribute:
<a href="[wpfilebase tag=fileurl id={file_id} /]" target="_blank">...Linking text or HTML elements...</a>


This shortcode lists files attached to the current post. You can optionally specify a list template.

[wpfilebase tag=attachments tpl="{list template tag}" /]


Inserts an AJAX tree view to browse files like the File Browser

[wpfilebase tag="browser" id={category id} path="{category path}" /]

With id or path you can set the browser’s root category. If both paremeters are not specified the File Browser will show all categories.


WP-Filebase Pro only. Embeds a form to upload files. Forms must previously be created with the backend WP-Filebase -> Embeddable Forms.

[wpfilebase tag="form" id="{form tag}" /]

In this case id ist not a number but the tag of the form to embed. See Embeddable Forms for details.


With the search parameter you can filter results in file lists.

The following shortcode gives you a list of all files (including all categories) that have 3d in the name, description, ID3, etc. or are tagged with 3d:

[wpfilebase tag="list" search="3d" /]

You can additionally provide the template parameter, to use a different list template and/or set one or more categories to search in:

[wpfilebase tag="list" id="5, 67, {cat_id..}" tpl="{template tag}" search="3d" /]

This following shortcode illustrates the use of multiple search terms:

[wpfilebase tag="list" search="hotfix zip filebase" /]

This search matches all files with hotfix, zip and filebase somewhere in name or other meta data. Sample matching file name: “”. The order of the space-separated terms does not matter.

Since WP-Filebase Pro, you can exclude files with matching keywords. Append the exlude operator (dash/hyphen-minus -) to the keyword that should be excluded from search:
[wpfilebase tag="list" search="filebase -hotfix" /]
This shortcode would lists all files matching on “filebase”, but don’t have “hotfix” in their names (or any other fields)

Addionally, you can use wildcards:

To search for ZIP files:
[wpfilebase tag="list" search="filebase *.zip" /]

Search for files with names beginning with “wp-filebase…”:
[wpfilebase tag="list" search="wp-filebase*" /]

Exclude ZIP files from search (exlude operator “-” combined with wildcard):
[wpfilebase tag="list" search="filebase -*.zip" /]

Note that search=”*filebase*” equals to search=”filebase”. That’s because if no wildcard is used, terms are automatically wrapped by them.

43 thoughts on “Shortcodes

  1. VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    It is an excellent post that you are sharing. Thanks for this information.

Leave a Reply

Your email address will not be published. Required fields are marked *