To insert a Drive file/folder (or Google Calendar) in a WordPress post, in the post editor click the ‘Add Google File’ button above the main text area. This will open a dialog box where you can search for the Drive file/folder you want.
Click on your file/folder to highlight it, and then pick one of the options presented beneath it, before clicking ‘Insert File’ to add it to the post.
Viewer file link
This option inserts a simple link to open the file in Drive. There is a checkbox option to display an icon to the left of the link in your post, and another option to open the file in a new tab instead of replacing the current tab.
Download file link
This will appear very similar in your post to a ‘viewer file link’ (and the option to add an icon is also present), but the file will download direct to the user’s computer instead of opening to view within the Google Drive website. This makes sense for non-Google file types (such as PDFs), but since Google docs such as Sheets cannot be downloaded directly, you will need to select an export file type for those documents. For example, Sheets can be downloaded as Excel XLS, and Google Documents can be downloaded as DOCX or PDF. (Export of Google docs is only available in the premium or enterprise version of the plugin.)
To embed a document directly in your post to be viewed inline, use the Embed document option.
You will be able to enter a width and height (in pixels, or use ‘100%’ to match the parent container width).
If the file does not seem to have the Embed Document option available, you may need to increase sharing settings within Google Drive to ‘anyone with the link may view’, or higher.
To embed Google Drive Folders or video/image file types, you will require the premium or enterprise version of the plugin. You will be notified if that is the case for your selected file. There are many extra options when embedding folders in the relevant plugin versions – see more here.
How does the plugin respect Google Drive sharing settings?
Google Drive Embedder will show different behavior depending on your document’s type and its sharing settings within Google Drive.
Generally, we recommend setting files’ Sharing settings to at least ‘anyone with the link can view’, in order for them to be visible to all visitors.
You can use lower sharing settings (e.g. share only within the organization, or with specific users), but in that case you will need your users to be logged in to a Google account that is authorized to view the content (otherwise, they will be told they do not have permission).
When using ‘anyone with the link can view’, you must understand that any visitors to your WordPress site will be able to obtain that document’s link and potentially open the document outside of your WordPress site.