1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Document Library Pro Hosted

Add your document library to WordPress

You can add your hosted document library to any WordPress page or post using a simple embed code. It takes a couple of minutes, and there is nothing to install or update.

The one thing to know: paste your embed code into a Custom HTML block (in the block editor) or the Text tab (in the Classic editor), not the normal visual editor. The visual editor can strip embed code out when you save, but these keep it intact.

Before you start: copy your embed code

In your hosted dashboard, open the Libraries screen and click Copy code next to the library you want to display. Your embed code looks like this (use the exact code from your own dashboard, not this example):

<iframe src="https://your-library.documentlibrary.app/?dlp_embed=1" title="Document library" style="width:100%;border:0;height:600px;" loading="lazy"></iframe>
<script src="https://your-library.documentlibrary.app/?dlp_embed_resize=1" async></script>

Add your library to a page or post

This is the best option for a standalone document library, such as a downloads, resources, or publications page.

  1. In your WordPress dashboard, go to Pages → Add New, or open the page or post you want to edit.
  2. Enter a title, such as Document Library.
  3. Click the + button, search for Custom HTML, and add the block.
  4. Paste your embed code into the block.
  5. Click Publish or Update.
  6. To help visitors find the page, add it to your menu under Appearance → Menus.

Click View Page to see your library live on your site. Visitors can search, filter by category, and download or preview each document.

A document library displayed on a WordPress page

Using the Classic editor

If your site uses the Classic editor, open the page, click the Text tab in the top-right of the content box to switch from Visual to HTML, paste your embed code where you want the library to appear, and then update the page.

If the library does not resize automatically

The embed code includes a small helper script that resizes the library to fit its content. Some WordPress security setups remove scripts added by non-administrators. If that happens the library still works, it simply displays at a fixed height with its own scrollbar. Pasting the code while logged in as an administrator keeps the resize script in place.

Prefer to host it yourself?

Document Library Pro is also available as a self-hosted WordPress plugin that builds the library directly inside your own site. The hosted version above needs no installation or maintenance, which is why most WordPress users choose it.

If searching the knowledge base hasn't answered your question, please contact support.