How to Insert a PDF in WordPress without using Plugin

July 26, 2024 / WordPress

In this article, you will learn how to insert a PDF in WordPress without the need for a plugin. Without the need for a plugin, inserting a PDF in WordPress gives you more control over the functionality of your website and less dependence on extra third-party apps.

Follow these steps:

  1. Add a PDF file to the Media Library on WordPress:
    1. Open the WordPress dashboard and log in.
    2. Go to Media > “Add New Media File” from there.
      add new media file
    3. To embed a PDF file, upload it.
      select files
  2. To duplicate the URL for the PDF file:
    1. Select the “Media Library” tab once the PDF has been uploaded.
    2. To access and view the contents of the PDF you submitted, click on it.
    3. Select the PDF’s link and copy it using the “Copy URL to clipboard” option.
      Alternative text
  3. Paste the URL into the post or page:
    1. To embed the PDF, either create a new post or adjust an old one.
      Add New Post
    2. In the editor where you want the PDF to display, paste the copied URL. Here’s how it will appear:
      https://yoursitename.com/wp-content/uploads/2024/01/your-pdf-file.pdf
  4. Add Embedding Code:
    1. The following HTML code can used to embed the PDF as an iframe:
      <iframe src=”https://yoursitename.com/wp-content/uploads/2024/01/your-pdf-file.pdf” 
      width=”100%” height=”600px”></iframe>
    2. The URL of your PDF file should used in place of the one inside the src attribute.
  5. Modify Width and Height (Optional):
    1. You can customize the tag’s width and height properties to suit your tastes. For optimal responsiveness, the width attribute should be set to 100%; you can change the height value as necessary.
  6. Publish or Update:
    1. To view the embedded PDF, publish your article or update the page after pasting the embedding code into it.
      update

You can use these instructions to insert a PDF on your WordPress website without the need for a plugin. If the content of the PDF is not your own, just make sure you have permission to use and distribute it.

You can learn more about how to incorporate a new link into the WordPress sidebar!

Leave a Reply

Your email address will not be published. Required fields are marked *