WP Manifestindependent plugin directory
manifest / editor / cdly-pdf-link

Codeally - PDF Link

A WordPress block that displays a PDF document link alongside its Media Library thumbnail preview.

by Bjarne Oldrup · github.com/oldrup/cdly-pdf-link · website

0stars
1release downloads
0forks

Install

The author publishes release zips, so WP-CLI can install straight from GitHub:

wp plugin install https://github.com/oldrup/cdly-pdf-link/releases/download/v1.3.0-beta.1/cdly-pdf-link.zip

Codeally - PDF Link (v1.3.0-beta.1)

A WordPress block that displays a PDF document link alongside its Media Library thumbnail preview.

Requirements

  • WordPress: 6.5+
  • PHP: 8.2+
  • Server: Imagick PHP extension and **Ghostscript***.

(Note: If your hosting environment lacks either of these, the plugin will still function but will fall back to displaying a generic document icon instead of a PDF thumbnail).

Tested with Classic and Block Themes

The block has been tested with the following popular classic and modern Block (FSE) themes:

  • Blocksy
  • GeneratePress
  • Kadence
  • Greyd
  • Ollie
  • Twenty Twenty-Five

Usage

  1. Insert the "Codeally - PDF Link" block in the editor.
  2. Click Select PDF Link to choose a document from the Media Library.
  3. The block automatically outputs the file's title and thumbnail.
  4. Choose between link styles (Top, Center, Bottom) or the Link Below layout in the block sidebar inspector.
  5. Optional: Choose a link font size; the thumbnail will scale accordingly.
  6. Optional: Set custom properties on the parent group to style multiple PDF Links simultaneously.

Screenshot

Screenshot 1 - Block Editor

For a PDF thumbnail that fits A4 and Letter pages beautifully:

  • Disable hard cropping; PDF thumbnails come in different aspect ratios.
  • Suggested dimensions: Width 192px, Height 288px (aspect ratio 2:3).

Custom CSS Properties

The block supports CSS custom properties for full layout, thumbnail, and typography overrides:

Property Description Default
--cdly-pdf-width Controls thumbnail width 2.5em
--cdly-pdf-gap Controls spacing between thumbnail and link 0.5em
--cdly-pdf-shadow Customizes thumbnail drop shadow Multi-layered drop-shadow
--cdly-pdf-hover Filter applied to thumbnail when hovering link saturate(115%) contrast(115%)

Technical Details

  • Block Supports: Inherits native padding, background color, text color, and font size.
  • Layout Variants: Supports is-style-top, is-style-center, is-style-bottom and column layout (is-style-below).
  • Static Fallback: The block saves standard HTML directly to the post content.
  • Deactivating: Deactivating the plugin leaves functional file links and screen reader text intact on the frontend.
  • Pathing: Uses root-relative paths (/wp-content/uploads/...) to prevent broken links during domain migrations.
  • Validation: Passes WordPress Plugin Check (PCP), Google Lighthouse, WebAIM WAVE, and manual accessibility testing.
  • Accessibility: Enhances screen reader navigation by appending visually hidden (PDF) text to the link.
  • Limitations: The block relies on existing thumbnails generated by WordPress upon upload.

Localization

  • Text domain: cdly-pdf-link
  • The provided .pot template is compatible with Poedit or Loco Translate.

License

Distributed under GPL-2.0-or-later.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.3.0-beta.1 latest
Aug 30, 2026 11d ago
cdly-pdf-link.zip
1