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
- Add a new block, and select the “File” option.
- Either Upload your PDF, or select one already uploaded to the Media Library.
- 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.
- 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!