Knowledge Base

Get answers when you need them most

User Tools

Site Tools


website:documents

Working with Documents

Working with WordPress and document files (think PDFs, Word documents, etc.) can be little disconcerting. You will find some simple instructions on this page to keep in mind when you want to load files for users to download.

What Format

Basically, it comes down to this:

  • Can the information be easily put into a webpage? If so, make it a webpage.
  • If it is a document that is not meant to be changed by the user, then use PDF.
  • If it is a document that is meant to be changed by the user, then use a Word document or appropriate editable format.

Those are simplistic terms, but you get the idea. Start by deciding if it could be a webpage, then if it should, and if it falls through … then choose your document format.

Where Does It Live?

In Plone it was easy to link directly to a document and just replace it in the future, preserving the URL so that anyone can have access to the latest document in the future just by virtue of changing the underlying file. However, WordPress does not have an easy or preferred way to do this, so a person needs to think about where the document needs to live and how it will be presented.

Documents should be linked to from a page that contains information about the document (context around why it is important, what a person can do with it, etc.), and then anytime someone needs to link to a specific document, they should be linking to that page with the context.

Example

You want to link to the Single Major Early Childhood Education program plan. It might be tempting to link to the PDF directly, but the next time that program plan changes and a new one is uploaded, that link will be bad and your user will get a 404 error message.

The better option is to use some verbiage similar to “You can find the single major Early Childhood Education program plan on the Program Plans page” and link the words “Program Plans page” directly to the Program Plans page. That way when a new program plan is uploaded, that link will still be accurate.

Uploading Documents

There are two options for uploading media (the end result is the same):

  • Through the WordPress Media Library (found under Media on the sidebar of your dashboard).
  • Through the Add Media button within the editing interface.

In each case, the object is to upload the file(s) you want to use and then link them within a page or post.

Upload Using Media Library

  • Log into the dashboard of your WordPress subsite
  • Click on Media on the sidebar
  • Click Add New on the resulting page
  • Drag-and-drop files into the area where indicated or click Select Files and find the documents you want to upload

Now your files are uploaded into the Media Library of your WordPress subsite.

Upload Using Editing Interface

  • Log into the dashboard of your WordPress subsite
  • Edit a page or post (either an existing page/post or a new one)
  • Click the Add Media button on the editing toolbar
  • Select the Upload Files tab on the resulting popup
  • Drap-and-drop files into the area where indicated or click Select Files and find the documents you want to upload

Now your files are uploaded into the Media Library of your WordPress subsite.

Inserting Documents

Now that the files are uploaded, here are the basic steps to inserting links to documents within a page or post.

  • Edit a page or post (either an existing page/post or a new one)
  • Click the Add Media button on the editing toolbar
  • From the Media Library tab, choose the document you want to link to (which should already be uploaded, for follow steps above)
  • When the item is selected, give it a Title (which will end up being the words that are linked in the end)
  • Click Insert Into Page to have it added to the page/post you were working on
  • Do it over again for each of the other documents

That's it! Now when you publish your page/post, you will find that there is link and that clicking it will open/download your document.

Potential Problems

  • The Title attribute of a document is important because it directly controls what words will be linked within the page/post you are working on. Always check to make sure the title is meaningful and will help the user understand what they are clicking.
  • Every time you upload a document, it is stored in a folder that is tied to the date it is uploaded. There is no way to overwrite a file, you will need to upload a new file and link to that instead. You can always go through the Media Library and delete old files that are no longer useful.
website/documents.txt · Last modified: 2018/07/30 17:39 (external edit)