Ensure that you have prepared your PDF document carefully in advance. PDF documents can be created using many different software packages.
Your PDF document should ideally be optimised for web use (as opposed to print) in most scenarios. This will provide quicker loading for your users. There are plenty of free websites which offer compression services such as:
Ideally the file name should use lower case letters and numbers but avoid spaces (or unusual characters) where possible.
When your document is prepared and ready to be added to your website, follow the steps below:
- Go to the page or post where the link to your document will be added
(create a new page or post if necessary).
- Locate your cursor precisely where the text link will be placed (but don’t type any text).
- Click the Add Media button (above the editing toolbar buttons).
- Click Select Files or drag your PDF file into the dotted box. Your PDF document will be imported into the WordPress Media library.
- Once the uploading/crunching process has completed, enter the text you require (for the link on the page) in the Title box.
- Under ATTACHMENT DISPLAY SETTINGS choose Link To Media File. This ensures that text added to your post will link to the file you have just uploaded.
Click the Insert into Page/Post button
- Don’t forget to press the Update or Publish button to finish.
Setting the PDF to open in a new browser tab
It’s often preferred that the PDF loads up in a new browser tab, so the user can easily return to your web page afterwards. To set this:
- Click anywhere within your linked text.
- Click the Edit button (pencil icon).
- Click the Link options button (cog icon).
- Tick ‘Open link in a new tab’ and click Update.
- Update the page or post to finish.
Linking images to PDFs
Images can also link to PDF documents and can create a more visible link than text.
1. If you haven’t already imported your PDF document, use Media > Add New in WordPress (from the dashboard) to import your document to the Media Library first.
2. Click on the PDF in the Media Library.
3. Copy the full URL (address) for the PDF to the clipboard.
4. Close the image and edit the page or post where your link will appear.
5. Insert the image (if not already added).
6. Select the image and press the Edit button (pencil icon)
7. Under DISPLAY SETTINGS, set ‘Link To’ to Custom URL.
Paste the URL of your PDF into the box underneath (copied in step 3).
If you would like the PDF opened in a new tab, tick the appropriate box under ADVANCED OPTIONS (further below).
8. To finish, click Update.
Lastly, update the page or post.