How to Upload Pdf to Wordpress Page

Read Time: 3 mins Languages:

In this tutorial you'll learn how to upload or link a PDF file to WordPress. If you've ever uploaded an epitome to the media library in WordPress, doing the same with a PDF is just as straightforward, so allow me explain how to do that.

Upload a PDF to WordPress

Follow forth with us over on our Envato Tuts+ YouTube channel:

1. Locate Your PDF File

I'm working with a demo PDF file on my system. Brand sure the file size isn't besides big (your PHP hosting will likely have a limit on file upload sizes) and ideally your file's filename shouldn't contain any foreign characters either.

In your WordPress admin go to Media > Library > Add New then use the file chooser to select your PDF, or drag and drib it into the browser:

Media  Library  Add New Media  Library  Add New Media  Library  Add New

Once uploaded you'll be able to requite the file a championship, a caption, and a description (if you lot want). And that'south how to upload a PDF to WordPress! Now let's meet a few ways nosotros can link to the PDF.

2. Copy and Paste the PDF File Link

Nearly importantly you'll demand the link to the file, so re-create the whole path every bit you encounter it displayed:

PDF link PDF link PDF link

You can and then use that link and attach it to text in pages or posts within WordPress, by highlighting your chosen link text and adding a link like so:

adding link in editor adding link in editor adding link in editor

One time saved, when y'all view the postal service on the front end of your website, the link will be present and when clicked will open your PDF in a browser window.

Linking From Images and Buttons

The same thing is possible with images and buttons. For example, upload an epitome to the WordPress Gutenberg editor, then click the link icon to add the PDF link:

Linking From Images Linking From Images Linking From Images

3. Using the Classic WordPress Mail Editor

What if you're not using Gutenberg? The same is possible using the Classic WordPress editor as well—the link push is found in the toolbar at the elevation of the editor:

Using the Classic WordPress Post Editor Using the Classic WordPress Post Editor Using the Classic WordPress Post Editor

And that's how you lot link to a PDF in WordPress! But wait, there's one more matter I desire to explain..

four. How to Directly Download a PDF From a Link

Before we wrap things up, here's an additional pull a fast one on. What if yous don't want users to click your PDF link and open up the PDF in another browser window? What if, instead, you'd like the PDF to directly download?

To achieve this, we need access to the HTML markup of the link itself. Then in the Classic Editor switch to the text tab:

text tab text tab text tab

In the Gutenberg editor yous tin gain access to the HTML lawmaking by clicking the three dots (options) menu similar so, and hit Edit as HTML:

Edit as HTML Edit as HTML Edit as HTML

Then (if y'all're familiar with reading HTML code) find the link in question, which should wait something similar this:

And so add the download attribute, anywhere within the main anchor tag, like this:

That's it! Now when someone clicks the link it will download the PDF to their system.

To learn more about how the download attribute works, here's a useful guide:

That'south All There is to information technology!

That's how yous tin upload a PDF to your WordPress website, and how you lot can link to it in a few different ways. I hope you found this tutorial useful, take a look at the following resources for more than beginners' tips!

Did you observe this post useful?

knightgeould.blogspot.com

Source: https://webdesign.tutsplus.com/tutorials/how-to-upload-pdf-to-wordpress--cms-35358

0 Response to "How to Upload Pdf to Wordpress Page"

Publicar un comentario

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel