Google Drive Viewer
The completely free plugin to display Google Drive folder contents using an Elementor widget. Includes admin settings for Google API key, REST endpoints for fetching and downloading files.
by Md. Ananto Islam Siyam · github.com/anantoislamsiyam/google-drive-viewer
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/anantoislamsiyam/google-drive-viewer/archive/refs/heads/main.zipGoogle Drive Viewer - WordPress Plugin
Embed Google Drive folders directly into your WordPress site
📋 About
Google Drive Viewer is a completely free WordPress plugin that allows you to display Google Drive folder contents directly on your website. With a dedicated Elementor widget and powerful REST API endpoints, you can seamlessly integrate your Google Drive files into any WordPress page or post.
✨ Key Features
| Feature | Description | Icon |
|---|---|---|
| 🔌 Elementor Widget | Drag-and-drop widget for Elementor page builder | 🧩 |
| 🔑 Google API Integration | Secure connection using Google Drive API key | 🔐 |
| 📁 Folder & File Display | Show entire folder structures or individual files | 📂 |
| 👁️ File Preview | Preview files directly in a popup modal | 👁️ |
| ⬇️ File Downloads | Direct download links for your files | ⬇️ |
| 🎨 Customizable Interface | Grid and list view modes with styling options | 🎨 |
| 🔄 REST API Endpoints | Programmatic access to file listings | 🔄 |
| ⚡ Lightweight & Fast | Optimized for performance with minimal overhead | ⚡ |
🚀 Installation
Method 1: WordPress Dashboard (Recommended)
- Go to Plugins → Add New in your WordPress admin
- Click Upload Plugin
- Choose the
google-drive-viewer.zipfile - Click Install Now
- Activate the plugin
Method 2: Manual Installation
# 1. Download the plugin files
# 2. Upload to your WordPress installation
wp-content/plugins/google-drive-viewer/
# 3. Activate from WordPress admin panel
Method 3: Via FTP
- Extract the plugin ZIP file
- Upload the
google-drive-viewerfolder to:/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
⚙️ Configuration
Step 1: Get Google API Credentials
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Drive API
- Create credentials → API Key
- Copy your API key
Step 2: Configure Plugin Settings
- Navigate to Google Drive Viewer → Settings in your WordPress admin menu
- Enter the following details:
-
Google API Key
Paste your Google Drive API key -
Default Folder ID (Optional)
Set a default Google Drive folder ID to load automatically
- Save the settings
Step 3: Using the Elementor Widget
- Edit a page with Elementor
- Search for Google Drive Viewer in the widget panel
- Drag & drop the widget to your desired location
- Configure widget options:
- Folder ID (from Google Drive URL)
- View Mode (Grid / List)
- File filtering options
- Display preferences
- Publish or update the page
📁 How to Get Google Drive Folder ID
- Open Google Drive in your browser
- Navigate to the folder you want to display
- Copy the folder ID from the URL:
https://drive.google.com/drive/folders/THIS_IS_YOUR_FOLDER_ID
🛠️ REST API Endpoints
The plugin provides REST API endpoints for programmatic access.
📂 Get Folder Contents
GET /wp-json/google-drive-viewer/v1/files?folder_id=FOLDER_ID
Example Response:
{
"success": true,
"data": [
{
"id": "file_id_123",
"name": "document.pdf",
"mimeType": "application/pdf",
"size": "2.5 MB",
"modifiedTime": "2024-10-15T10:30:00Z",
"webViewLink": "https://drive.google.com/file/d/...",
"webContentLink": "https://drive.google.com/uc?export=download&id=...",
"iconLink": "https://drive-thirdparty..."
}
]
}
Download File
GET /wp-json/google-drive-viewer/v1/download?file_id=FILE_ID
➡️ Redirects to the Google Drive download URL.
🎨 Frontend Features
🔳 View Modes
-
Grid View
Thumbnail-based layout with visual previews -
List View
Detailed list with file information and actions
📄 File Actions
- 👁️ Preview – View files in a popup modal
- ⬇️ Download – Direct download links
- 🔗 Open in Drive – Open files directly in Google Drive
- ℹ️ View Details – File size, type, and last modified date
🪟 Popup Preview
Files can be previewed directly on your website with:
- Navigation controls (back / forward)
- Grid & list view toggle buttons
- Download button
- Responsive iframe-based document preview
Releases
1 release.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.