Skip to Content

WordPress: Adding documents with the File Block

There are multiple ways to add a link to a file, like a PDF, on your pages and posts. You could use a text link, or a Button block. This would allow the user to open the PDF in the browser.

However, what if you wanted to make it easy for the user to download the PDF file instead? That’s where the File block comes in handy.

The File block provides a regular text link, as well as a “Download” button that the user can click to save the PDF to their computer.

How to add a File block

  1. Add a new block, and select the “File” option.
Select a File block.
  1. Either Upload your PDF, or select one already uploaded to the Media Library.
  2. This will place a text link and a Download button on the page. Be sure to re-type the text link to be something accessible and human friendly. No dashes, special characters, random numbers, etc.
Re-typing text link to be human friendly in a File block.
Making our text link human friendly.
  1. Select the block and check out the block’s settings on the right. You can set up the text link to open up to the Media file (new tab), or to the file attachment page. The download button will save the file to the user’s machine. You can optionally hide the download button, but in that case you may want to just use a text link!
File block settings, includes select option for link to, toggle for open in new tab, and toggle for show download button (on by default)
File block settings.