Daily Archives: December 18, 2014

PDF Files in WordPress

Before anyone complains, there is no mistake; “pdf files” is no misnomer! PDF stands for “portable document format” and so it is OK to write pdf files.

Someone asked me recently if it is possible to link to pdf files in WordPress. It is very easy and an opportunity to learn a little more about the basics of working with WordPress.

Installing PDF Files

Open the editor and then click the Add Media button towards the top left. Then click the Upload Files tab. Drag and drop a pdf file from your desktop or click Select Files and navigate to your pdf file.

Now click on the Media Library tab. The pdf file will soon upload, depending on its size and will appear on the left of the top row. Highlight it by clicking on it once.

Using PDF Files

There are two things in the Attachment Details column on the right you need to know. The first is the url. You will see the pdf file has its own unique url. You can link to it from anywhere on the site or on the web.

Everything in the media library has its own unique url. You can set up an image so, when a visitor clicks on it, they see just the image. This can be useful if the image has a lot detail.

Let’s say you call your pdf file “How to install a frog pool”. In your text you have highlighted the words “install a garden pond” and want that to link to the pdf. You can do this by using the link button in the editor and pasting in the pdf url.

Usually, though there may seem to be little point in doing this because you will need to go into Media Library to find the url. However, if you click Insert into post, you will find “install a garden pond” is replaced by “How to install a frog pool”. Why?

You will find the name of the pdf file copied into the document title and if you insert from the Media Library, it pastes the title over the highlighted text. If you want to insert the document title, then simply position the cursor where you want the title and link to appear.

Alternatively, paste in the url in as I described earlier. If you know you will feature the pdf file only once, then it may be OK to change the text in the Title box but if you are likely to use it more than once, it is better to use the other method.