5th Nov '23
/
25 comments

Media Library PDF Attachments Listing in Bricks

Updated on 9 Sep 2024

This Pro tutorial provides the steps for displaying PDF files from a HappyFiles folder as a list/grid using a Bricks query loop with PDF title, caption, description, file size and a view/open button that loads the file in a lightbox. We shall use Adobe PDF Embed API for rendering the PDFs so they work in all devices.

When done, the element structure is going to be like this:

Step 1

Get your free PDF Embed API key.

Register/log into your Adobe account and create a new project or new credentials.

Keep the browser tab open showing your API key or paste/save it in a note.

Note that the keys are domain specific and that a key also works on sub domains.

Step 2

Install and activate HappyFiles (we used the Pro version in our test site).

Go to Media → Library. Create a folder and upload/drag existing PDF files into it.

Click on each file and enter meta data.

Step 2

Let's add helper functions for getting file size, URL, caption and description of the media item in the Bricks query loop.

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

HappyFiles Bricks Query Loop

HappyFiles Bricks Query Loop

This tutorial explores different ways in which images from WordPress Media Library organized via HappyFiles can be pulled and shown in Bricks using query loop(s).…
Categories:
Download Area with HappyFiles

Download Area with HappyFiles

Aside from the series I'm currently writing on how to create custom galleries and sliders with HappyFiles, Metabox and Bricks, I have developed a snippet…
Categories:
How to create custom colorthemes for your website with happyfiles

How to create custom colorthemes for your website with happyfiles

Happy Files is certainly known to many as the media management of the Wordpress media library, which is in dire need of improvement.
Developed by Thomas…
Output HappyFiles Folders in Metabox Select-Field

Output HappyFiles Folders in Metabox Select-Field

This tutorial is part of a series where I'm gonna show you how to output custom HappyFiles Galleries and Sliders. Part one will cover a…
Categories:
Pro
HappyFiles Folder Images via Meta Box Taxonomy Field in Bricks Image Gallery

HappyFiles Folder Images via Meta Box Taxonomy Field in Bricks Image Gallery

How to set the source of Bricks’ Image Gallery element on a post to images in the selected HappyFiles Folder(s) via a Meta Box Taxonomy…
Pro
Dynamic HappyFiles Gallery in Bricks with Meta Box or ACF Pro

Dynamic HappyFiles Gallery in Bricks with Meta Box or ACF Pro

Updated on 12 Jul 2023 This Pro tutorial provides the steps to show the images uploaded to an "Image Advanced" type of custom field created…
Categories: