How to Embed a PDF in WordPress without using Plugin

March 8, 2024 / WordPress

In this tutorial, you will explore how to embed a pdf in WordPress without using Plugin. Embedding a PDF in WordPress without using a plugin allows for greater control over website performance and reduces reliance on additional third-party software.

To embed a PDF in WordPress without using a plugin, you can follow these steps:

  1. Upload PDF to WordPress Media Library-
    1. Log in to your WordPress dashboard.
    2. Navigate to Media > Add New.
      add new media file
    3. Upload the PDF file you want to embed.
  2. To copy the PDF file link-
    1. After uploading the PDF, go to the “Media Library” tab.
    2. Click on the PDF you uploaded to open it and see its details.
    3. Copy the link of the PDF from the “Copy Link” field.
      copy URL to clipboard
  3. Paste URL into Post or Page-
    1. Create a new post or edit an existing one where you want to embed the PDF.
    2. Paste the copied URL into the editor where you want the PDF to appear. It will look something like this-
  4. Add Embedding Code-
    1. To embed the PDF as an iframe, you can use the following HTML code-<iframe src=”” width=”100%” height=”600px”></iframe>
      Replace the URL inside the src attribute with the URL of your PDF file.
  5. Adjust Width and Height (Optional)-
    You can adjust the width and height attributes in the <iframe> tag according to your preference. The width attribute should be set to “100%” for responsiveness, and you can adjust the height value as needed.
  6. Publish or Update-
    Once you have pasted the embedding code into your post or page, you can publish the post or update the page to see the embedded PDF.

By following these steps, you can embed a PDF in your WordPress website without using a plugin. Just ensure that you have permission to use and share the PDF content if it is not your original work.

Spread the love