This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Dan's Viewer for Google Drive


Dan’s Viewer for Google Drive was created when I was looking for a way to share files via Google Drive on my sites, in a way that allowed downloading, viewing, exporting, and hardest to find, the ability drill down into subfolders without leaving the site. I couldn’t find anything within my price range that fit what I needed, so I decided to create my own.

Dan’s Viewer for Google Drive displays files in a way that is mobile friendly, customizable via shortcode, and easy to style. No need to import files or manage them directly in WordPress. All you need is a public Google Drive Folder (or multiple!) and a free, easy to get API key.


  • Displays public drive document listings in a mobile friendly format

  • Offers both View and Download Options, where appropriate

  • Offers Export Option for Google Docs / Sheets / Presentations

  • All options are configured via shortcode

  • Allows drill down / up within folders without leaving the page

  • Ability to store and use unlimited Google Drive Folders


  • Default Display [dandrive] (defaults to 1st drive)

  • Optional Attributes Ex:[dandrive drive=1 divid=mydrive height=400 width=300 rbutton=no]

  • drive= (number of the drive you want, defaults to 1 if not entered)

  • divid= (id of the div your calendar is stored in, for custom theming. Defaults to random string to allow multiple per page)

  • height= (maximum height in pixels, defaults to auto. If this is set, a scroll bar will appear if your div overflows. Enter a number only).

  • width = (maximum width in pixels, defaults to 400. Enter a number only)

  • rbutton = (no means don’t display return to initial folder button. Omit to display (default behaviour))

For help creating an API key to use with this plugin, either check out the settings page in plugin, or the FAQ tab here.

To see other plugins like this, or tips on how these are built, check out WP Tech Guides.

Thanks to Mike @ WP Bullet Guides for the banner and icon.

Dependencies and Liscencing

Depends on Google Drive’s JavaScript API v4


  • View of Shared Folder with View / Download

  • Settings Page


  1. Upload the plugin files to the /wp-content/plugins/dans-gdrive-viewer directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Head over to the Dan’s GDrive settings page, found on the Dashboard sidebar.


How do I create my API key?

To create API key, visit Google Developers Console.
Then, follow bellow;

  • Create new project (or use project you created before).

  • Check “APIs & auth” -> “Credentials” on side menu.

  • Hit “Create new Key” button on “Public API access” section.

  • Choose “Browser key” and keep blank on referer limitation.

  • Set this key on the plugin’s setting page.

How do I find the ID for the folder I want to share?

Once you have set the folder as public, you can find the id with the following:

  • Visit https:/, while logged in to your account.

  • Enter the folder that you have shared publically

  • Find the folder ID from the url, after the /folders/. Example: , where xxxxxxxxxxxxxxx is the key.


Excelente! Very useful!

Instalado hoy y probado en WP 4.7.5 y funciona perfecto. Buscaba algo simple que me muestre el directorio de carpetas y archivos en google drive y lo conseguí. Lo único que podría sugerir sería un botón que permite subir un nivel, además del botón que lleva a la raíz. Cambié la mayoría de los textos a español en el editor de plugin en los siguientes archivos: - dans-gdrive-viewer.php - js/dandrive.js Works in 4.7.5. The only thing I could suggest could be a button to back or up one level, plus the root button that already has. Thank you very much for this plugin.

Great plugin

Does exactly what I needed, thanks for your work on this and looking forward to future versions
Read all 4 reviews

Contributors & Developers

“Dan's Viewer for Google Drive” is open source software. The following people have contributed to this plugin.




  • Moved Dashboard Link Under Tools
  • Added jQuery dependency to enqueues
  • Updated Supported Version


  • Initial Plugin Release