Print

Embedding Google Documents in Articles

Embedding Google Documents in WordPress posts allows you to display documents directly on your website, providing a seamless experience for your visitors. Below are several methods you can use to embed Google Docs into your WordPress posts.

Step-by-Step Guide:

  1. Open Your Google Document:

    • Navigate to the Google Doc you wish to embed.
  2. Publish to the Web:

    • Click on File > Publish to the web.
    • In the dialog box, select the Embed tab.
    • Click Publish and confirm by clicking OK.
  3. Copy the Embed Code:

    • After publishing, Google provides an iframe embed code.
    • Copy this code to your clipboard.
  4. Insert into WordPress Post:

    • Classic Editor:
      • Switch to the Text editor tab.
    • Gutenberg Block Editor:
      • Add a Custom HTML block.
    • Paste the iframe code where you want the document to appear.
  5. Adjust Permissions:

    • Ensure the Google Doc’s sharing settings are set to Anyone with the link can view.
  6. Publish or Update Your Post:

    • Save your changes and preview the post to ensure the document is embedded correctly.

Several plugins simplify the embedding process:

Option A: Embed Any Document Plugin

Steps:

  1. Install and Activate the Plugin:

    • Go to Plugins > Add New.
    • Search for Embed Any Document.
    • Install and activate it.
  2. Embed the Document:

    • In the post editor, click the Add Document button.
    • Choose Google Drive as the source.
    • Authenticate your Google account if prompted.
    • Select the document to embed.
    • The plugin inserts a shortcode into your post.
  3. Publish Your Post:

    • Save or update your post to view the embedded document.
 

Option B: EmbedPress Plugin

Steps:

  1. Install and Activate EmbedPress:

    • Navigate to Plugins > Add New.
    • Search for EmbedPress.
    • Install and activate it.
  2. Embed the Google Doc:

    • Copy the URL of your Google Doc.
    • Paste the URL directly into the WordPress editor.
    • EmbedPress automatically renders the embed.

Steps:

  1. Install Required Plugins:

    • Install and activate Google Apps Login and Google Drive Embedder.
  2. Configure Google Apps Login:

    • Set up API access by following the plugin’s instructions.
  3. Embed the Document:

    • In the post editor, click Add Google File.
    • Browse and select your Google Doc.
    • Insert it into the post using the provided options.

If your WordPress setup allows iframes, you can embed the document directly:

Steps:

  1. Get the Embed Code from Google Docs:

    • Go to File > Publish to the web > Embed.
    • Copy the iframe code.
  2. Insert into WordPress:

    • In the Text or HTML editor, paste the iframe code.
  3. Publish Your Post:

    • Save your changes and ensure the embed displays correctly.

Steps:

  1. Get the Shareable Link:

    • Ensure your Google Doc is set to Anyone with the link can view.
  2. Create the Embed URL:

    • Extract the File ID from your document’s URL.
    • Format the embed link:
      https://drive.google.com/file/d/YOUR_FILE_ID/preview

       

  3. Insert into WordPress:

    • Use an iframe tag in the HTML editor:
      <iframe src=”https://drive.google.com/file/d/YOUR_FILE_ID/preview” width=”640″ height=”480″></iframe>

  4. Publish Your Post:

    • Save and check the embedded document on your site.

While not an embed, linking is a straightforward method:

Steps:

  1. Set Document Sharing Settings:

    • In Google Docs, click Share.
    • Set to Anyone with the link can view.
  2. Insert the Link into Your Post:

    • Highlight text in your post editor.
    • Click the Insert/Edit Link button.
    • Paste the Google Doc URL.

Considerations

  • Permissions: Always ensure your Google Doc’s sharing settings allow the intended audience to view the document.
  • Security: Some WordPress sites restrict iframes for security. If your embed isn’t showing, check with your administrator.
  • Responsive Design: Adjust the width and height in iframe codes to make the embed responsive.
  • Updates: Changes made to the Google Doc after embedding will reflect automatically if you’ve used the embed code or certain plugins.
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?
Table of Contents