So here are the 4 ways to embed a PDF file in WordPress without using a plugin:

  1. Use the built-in media uploader: You can upload the PDF file to your WordPress site and then insert it into a post or page using the built-in media uploader. Simply click the “Add Media” button, select the PDF file, and insert it into your content.
  2. Use the PDF Embedder Shortcode: You can use the [pdf-embedder] shortcode to embed PDF files in your posts and pages. Just upload your PDF file to your site and then use the shortcode in your content.

3. Use HTML code: you can use <iframe> tag in HTML mode, which allows you to embed the PDF file directly into the content.

<iframe src="http://your-site.com/path-to-pdf" width="800" height="600"></iframe>

4. Use Google Docs Viewer: You can use the Google Docs Viewer to embed PDF files in your WordPress site.

<iframe src="https://docs.google.com/gview?url=http://your-site.com/path-to-pdf&embedded=true" width="800" height="600"></iframe>

Please make sure you have the correct permission to embed the pdf and it’s accessible publicly.

Categorized in: