Docs Shortcodes Complete Shortcode Reference

Complete Shortcode Reference

[td_file] — Single Document Link

Renders a download link for a single document with an automatic file type icon.

Attribute Required Default Description
id Yes Document ID from ToolDocs
gate_link No "true" Use gated hash ("true" or "false")
link_text No File name Custom text for the link
bypass No Global setting Override global bypass setting ("true" or "false")

Examples:

[td_file id="5"]                                    <!-- Gated link, file name as text -->
[td_file id="5" link_text="Download Our Whitepaper"] <!-- Gated, custom text -->
[td_file id="5" gate_link="false"]                   <!-- Ungated direct download -->
[td_file id="5" bypass="true"]                       <!-- Force bypass on -->
[td_file id="5" bypass="false"]                      <!-- Force bypass off -->

[td_category_files] — Category File List

Displays all files in a category, optionally inside a modal popup.

Attribute Required Default Description
category_id Yes Category ID from ToolDocs
modal No "true" Display in modal popup
gated No "true" Use gated hashes
bypass No Global setting Override global bypass setting
[td_category_files category_id="3"]                    <!-- Modal popup -->
[td_category_files category_id="3" modal="false"]       <!-- Inline list -->
[td_category_files category_id="3" gated="false"]       <!-- Ungated links -->

[td_document_registration] — Registration Form

Renders the document registration form. Place this on the page assigned as the Registration Page in Settings.

Attribute Required Default Description
redirect No URL to redirect after registration
[td_document_registration]
[td_document_registration redirect="/thank-you"]

[td_whitelist_registration] — Whitelist Form

Renders the whitelist registration form for categories requiring admin approval.

Attribute Required Default Description
redirect No URL to redirect after submission
[td_whitelist_registration]
[td_whitelist_registration redirect="/request-submitted"]

[td_document_login] — Login Form

Renders the login form for returning users. Adapts based on your authentication method.

Attribute Required Default Description
redirect No URL to redirect after login
[td_document_login]
[td_document_login redirect="/documents"]

File Type Icons

The [td_file] and [td_category_files] shortcodes automatically display Font Awesome icons based on file type: PDF, Word, Excel, ZIP/RAR, external links, and a default icon for other types. Icons can be customized via filter hooks (see Filter Hooks Reference).

Font Awesome

Font Awesome is automatically enqueued when document shortcodes are rendered. If your theme already loads Font Awesome, disable the ToolDocs™ copy in Settings → Font Awesome to avoid loading it twice.

Related Articles

Was this article helpful?