Shortcode reference: [filedeck] Free & Pro

Complete [filedeck] shortcode reference: layout, columns, category, per_page, and sort attributes with defaults and copy-paste examples.

Updated August 25, 2026

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; attributes control the layout, columns, category scope, page size, sort order, and presentation details like the download-button text.

Attributes

Attribute Values Default What it does
layout table, grid, gallery, folders table Chooses the library layout: a sortable table, a card grid, a large-thumbnail gallery, 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.
link_style button, button_icon, button_icon_only, icon, icon_text, text Plugin default How the download link in the link column renders: a plain button, a button with icon and text, a button with just the icon, a bare icon, an icon next to a text link, or a plain text link.
dl_text Any text Download Custom text for the download button/link, e.g. dl_text="Get file". Also settable site-wide under Documents → Settings.
image_lightbox 1, 0 1 Whether clicking a featured image in the image column opens it full-size in a lightbox.
empty_message Any text No documents found. The message shown when the library has nothing to display. Also settable site-wide under Documents → Settings.
empty_filtered_message Any text No documents match your search. The message shown when a search or filter matches nothing. Falls back to empty_message.
empty_link_text + empty_link_url Link label + URL none An optional link shown after the empty-state message — point a "can’t find it? let us know" message at your contact page. Both must be set.
wrap 1, 0 1 Set wrap="0" to keep every document on a single row — long text is truncated with an ellipsis instead of wrapping.
scroll_offset A number (pixels) none If your theme has a sticky header, pagination jumps can land underneath it. Set the header’s height, e.g. scroll_offset="80", so jumps land just below it.
pagination_mode numbers, loadmore, infinite Plugin default Page numbers, a Load more button, or infinite scroll. Infinite scroll keeps the button as well, and pauses for a click after five automatic loads.
height A CSS length — px, rem, em, vh or % none Fix the library’s height and scroll the documents inside it, e.g. height="600px". The search box and filters stay put above. Leave it off for a library that grows with its content.
filter_position above, headings Plugin default Where the category, tag and custom-field filters sit. headings puts each one in a row under the table’s column headings — table layout only, and on phones they move back above the cards. A filter whose column isn’t displayed stays in the bar above.
tag One or more document tag slugs, comma-separated All tags Limits the library to the given tags. Combine with category to narrow further.
include Document IDs, comma-separated none Show only these documents, e.g. include="12,44,91".
exclude Document IDs, comma-separated none Omit these documents from the library.
status publish, private, draft, pending, future publish Which post status to list. Anything other than publish is only honoured for a logged-in user who has the capability for it — private needs permission to read private posts, and draft, pending and future need editing rights. Everyone else sees published documents only.
limit A number All documents A hard ceiling on how many documents the library holds in total, applied before pagination. Use per_page for page size; use limit for "only ever show the 10 newest".
accent_color A hex colour, e.g. #1e40af Plugin default The library’s accent colour — buttons, links, focus rings.
surface_color A hex colour Plugin default The card/table surface colour.
text_color A hex colour Plugin default The body text colour; muted text is derived from it.
color_scheme (alias scheme) dark, auto Light dark forces the dark palette; auto follows the visitor’s device setting. Omit for light.
style_preset (alias preset) match-theme, minimal, bordered, compact Plugin default The presentation preset: inherit your theme’s colours, drop the card border and shadow, use stronger lines, or use dense rows. See styling.
grid_columns 16 Automatic Fixes the number of cards per row in the grid and gallery layouts. Ignored by the table and folder layouts.
title_link single, download, none single What the document title links to: its own document page, a direct download, or nothing (plain text).
filename_link none, download none Whether the filename column is a direct download link or plain text.
new_tab 1, 0 0 Open downloads in a new tab.
enable_preview 1, 0 Plugin default Turn the preview lightbox on for this library without changing the site-wide setting.
search_on_click 1, 0 1 Whether clicking a category name in the table filters the library by it.
show_page_length 1, 0 0 Show a "documents per page" dropdown above the library. Ignored by the folders layout.
show_period_filter 1, 0 0 Show the date-added filter — Any time / Past week / month / 3 months / year — alongside the library’s other filters.
period a number of days, e.g. 30 Pre-filter the library to documents published in the last N days. Works with or without show_period_filter; on its own it makes a "recent additions" library with no control.
folders_open 1, 0 0 In the folders layout, start with every folder expanded instead of collapsed.

Pro attributes

These attributes belong to Pro features. enable_multi_download and site do nothing at all in the free plugin. hide_protected still works as a shortcode attribute in the free plugin, but the site-wide setting behind it — and the access rules that make a document restricted in the first place — are Pro.

Attribute Values Default What it does
enable_multi_download 1, 0 Plugin default Show the checkboxes and the "Download selected as zip" button. See zip downloads.
hide_protected 1, 0 Plugin default Remove restricted documents from the library entirely instead of showing them with a padlock. See access control.
site A blog ID, e.g. 2 none On a multisite network, render another site’s library in place. See multisite shared libraries.

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 — free for PDFs and images, with Office, audio and video added by Pro. (The preview column also needs the Document preview lightbox toggle under Documents → Settings → Features, which is off by default.)

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:

  1. In the block editor, add a Shortcode block and paste the shortcode into it.
  2. In the classic editor, paste the shortcode directly into the content.
  3. In widget areas and most page builders, use their shortcode or text element.

If you are working in the block editor, the Document Library block is usually more convenient — its options cover the most common attributes (layout, columns, category, page size) and it shows a live preview while you configure them. For the rest, use the shortcode.

The [filedeck_search] shortcode

FileDeck includes four more shortcodes in the free plugin: [filedeck_search] renders a standalone library search box anywhere on your site (a homepage hero, a sidebar, a footer); [filedeck_login] shows a sign-in prompt for gated libraries; [filedeck_download] renders a single document’s download button; and [filedeck_qr] prints a QR code linking to a document. Searches open your document library with the query applied. See standalone search box for its attributes 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, multi-column sorting, and multi-select category and tag filters with counts, regardless of how it was inserted. See instant search, sorting, and filters.

Is the shortcode a Pro feature?

No. [filedeck] and every attribute in the main table above are included in the free plugin. The three attributes under Pro attributes are the ones tied to Pro features — see that section for what each one does without a licence.

Still stuck? Email support@getfiledeck.com.