BT Downloads

A WordPress plugin for tracking downloadables and inserting download cards in posts.

Requires: WordPress 5.8+, PHP 7.4+

Features

  • Custom post type for downloads: file URL, version, description, info link, icon, changelog
  • Editable HTML template with Mustache-style conditionals ({{#var}}...{{/var}})
  • Custom CSS with live-updating preview
  • Upload buttons for file and icon on the download edit screen (files go to uploads/downloads/)
  • Insert tools for classic editor (TinyMCE button) and block editor (Download block)
  • WP-CLI import from CSV: wp btdl import_downloads --file=/path/to/downloads.csv

Installation

  1. Upload the bt-downloads folder to /wp-content/plugins/.
  2. Activate the plugin via Plugins in WordPress.
  3. Use Downloads in the admin to add downloads and Card template to customize HTML and CSS.

Admin

The plugin adds a Downloads item to the WordPress admin menu with sub-items: Downloads, Add New Download, and Card template.

Downloads menu in the WordPress admin sidebar

The main Downloads screen lists all download entries with title, shortcode ID, version, and date. Use the shortcode ID in [download ID] to embed a card.

Downloads list in the WordPress admin

When editing a download, you set the file URL, version, description, info URL, icon, dates, and changelog. The Shortcode meta box shows the exact shortcode (e.g. [download 128]) to use in posts or pages.

Edit Download screen with file, version, description, and shortcode

Card template

Under Downloads -> Card template you can edit the HTML template and custom CSS for download cards. The template uses variables such as {{title_str}}, {{file}}, {{version}}, {{description}}, and conditionals like {{#description}}...{{/description}}. A live preview updates as you type.

Download card template and custom CSS with live preview

Inserting downloads in the editor

Classic editor

A TinyMCE button opens a Select a download… dropdown. Pick a download to insert its shortcode.

Classic editor: Select a download dropdown

Block editor

Add a Download block. In the block settings sidebar, use the Download dropdown to choose which download to display.

Block editor: Download block with sidebar selector

After selecting a download, the block shows the card (e.g. title, download link, description) in the editor.

Block editor: Download block showing a rendered card

You can also use the block toolbar to pick a download when the block is selected.

Block editor: Download block toolbar with Download option

Or start typing /download to select:

<figure class=”aligncenter /uploads/2026/02/download-select.jpg 596 285 “Block editor: Download block with /download” “Block editor: Download block with” data-title=””>

<picture>
  <noscript class="loading-lazy">
    <source media="(max-width: 640px)" srcset="https://cdn3.brettterpstra.com/download"" />
    
    
    <source srcset="https://cdn3.brettterpstra.com/download" 1x, https://cdn3.brettterpstra.com/download" 2x" />
    <img  data-original="https://cdn3.brettterpstra.com/download"" data-at2x="https://cdn3.brettterpstra.com/download"" src="https://cdn3.brettterpstra.comhttps://cdn3.brettterpstra.com/download""  />
  </noscript>
</picture>

<figcaption></figcaption>
        </figure>

Frontend output

On the frontend, the shortcode (or block) renders a download card: title, download link, description, dates, and optional donate/info links, styled by your template and custom CSS.

Example download card on the frontend

Shortcode

Use [download 27] where 27 is the shortcode ID of the download (shown in the Downloads list and on the edit screen).

WP-CLI

Import downloads from a CSV:

wp btdl import_downloads --file=/path/to/downloads.csv

CSV columns: id, title, file, version, description, info, icon, updated, created, changelog. Paths starting with / are converted to your uploads URL.

License

GPLv2 or later.

Download

BT Downloads v1.0.0

WordPress Plugin to track downloadables and generate download cards.

Published 02/02/26.

Updated 02/02/26. Changelog

DonateMore info…

Changelog

Click to expand

1.0.2

2026-02-02 08:19

CHANGED

  • Created and Updated dates use datetime-local inputs (date and time) instead of text; stored as YYYY-MM-DD HH:mm.
  • Card preview meta box on download edit screen with iframe and “Preview with site theme” link.
  • AJAX card preview for template/CSS settings so both template and custom CSS update the preview.
  • “Set to current date/time” link for Created and Updated date fields in the download editor.
  • Template sanitization preserves {{variable}} and style=”{{…}}” placeholders; only strips script tags and event handlers.
  • Default download card template and CSS: icon wrap is a link, new layout and typography, default download icon SVG overlay, .dl-meta for published/updated.

1.0.1

2026-02-02 08:15

CHANGED

  • Created and Updated dates use datetime-local inputs (date and time) instead of text; stored as YYYY-MM-DD HH:mm.
  • Card preview meta box on download edit screen with iframe and “Preview with site theme” link.
  • AJAX card preview for template/CSS settings so both template and custom CSS update the preview.
  • “Set to current date/time” link for Created and Updated date fields in the download editor.
  • Template sanitization preserves {{variable}} and style=”{{…}}” placeholders; only strips script tags and event handlers.
  • Default download card template and CSS: icon wrap is a link, new layout and typography, default download icon SVG overlay, .dl-meta for published/updated.

1.0.0

2026-02-01 08:00

  • New: Adds a custom Downloads post type with fields for file URL, version, description, info link, icon, and changelog.
  • New: Download card system with editable HTML template (Mustache-style {{variable}} and {{#variable}}...{{/variable}} conditionals).
  • New: Custom CSS editor with live preview for download cards.
  • New: Classic editor integration via TinyMCE button and download picker.
  • New: Block editor integration via a Download block that renders the configured card.
  • New: WP-CLI import command wp btdl import_downloads --file=/path/to/downloads.csv for bulk-creating downloads from CSV.

Speaking of BT Downloads…

Related Projects