Shortcode reference: [filedeck] Free & Pro
Complete [filedeck] shortcode reference: layout, columns, category, per_page, and sort attributes with defaults and copy-paste examples.
The [filedeck] shortcode renders a document library anywhere shortcodes work — pages, posts, widget areas, and page builders. On its own, [filedeck] outputs a table of all your documents with the default columns; a handful of attributes control the layout, columns, category scope, page size, and sort order.
Attributes
| Attribute | Values | Default | What it does |
|---|---|---|---|
layout |
table, grid, folders |
table |
Chooses the library layout: a sortable table, a card grid, or collapsible category folders. |
columns |
Comma-separated column keys (see below) | title,excerpt,categories,date,size,type,link |
Which columns display, in the order listed. |
category |
One or more document category slugs, comma-separated | All categories | Limits the library to the given categories. |
per_page |
A number | Plugin default | How many documents show per page before pagination or load more kicks in. See pagination. |
sort_by |
title, date, modified, menu_order |
Plugin default | Initial sort field. Visitors can still re-sort by clicking table column headers. |
sort_order |
asc, desc |
Plugin default | Initial sort direction. |
Column keys
The columns attribute accepts any of these 16 keys, and the order you list them is the order they display:
id, image, title, excerpt, content, categories, tags, date, modified, author, size, type, filename, downloads, preview, link
Each key is described in choose and reorder columns. A few to note: content shows the document’s description text, link is the download link (button, icon, or text styles), downloads shows the download count, and preview adds an inline preview button (Pro).
Copy-paste examples
A default library — table layout, default columns, all documents:
[filedeck]
A compact table sorted by title:
[filedeck layout="table" columns="title,categories,date,size,link" sort_by="title"]
A grid of newsletters with featured images, 12 cards per page:
[filedeck layout="grid" columns="image,title,excerpt,date,link" category="newsletters" per_page="12"]
A folder view of your whole library, grouped by document category:
[filedeck layout="folders" columns="title,size,type,link"]
Scoping to more than one category — this shows documents from either category:
[filedeck category="policies,forms"]
Where can I use the shortcode?
Anywhere WordPress processes shortcodes:
- In the block editor, add a Shortcode block and paste the shortcode into it.
- In the classic editor, paste the shortcode directly into the content.
- In widget areas and most page builders, use their shortcode or text element.
If you are working in the block editor, the FileDeck Library block is usually more convenient — its options map 1:1 to these attributes and it shows a live preview while you configure them.
The [filedeck_search] shortcode (Pro)
FileDeck Pro adds a second shortcode, [filedeck_search], which renders a standalone library search box anywhere on your site — a homepage hero, a sidebar, a footer. Search results link into your document library. See standalone search block and widget for details and examples.
FAQ
What happens if I omit an attribute?
The library falls back to that attribute’s default: table layout, the default column set, all categories, and the default page size and sort order. [filedeck] with no attributes is a complete, working library.
Can I put two shortcodes on the same page?
Yes. Each shortcode renders independently with its own layout, columns, and category scope. See multiple libraries on one site.
Do shortcode libraries support search and filtering?
Yes. Every library rendered by [filedeck] includes instant search, click-to-sort columns, and category and tag filter dropdowns, regardless of how it was inserted. See instant search, sorting, and filters.
Is the shortcode a Pro feature?
No. [filedeck] and all five attributes are included in the free plugin. Only [filedeck_search] requires Pro.
Still stuck? Email [email protected].