How to Create a Gallery Widget Using Ninja Drive
The Google Drive Gallery widget lets you display Google Drive images as a beautiful, responsive gallery anywhere on your WordPress site — pages, posts, or widget areas. No manual uploading or syncing required; the gallery reads directly from your Google Drive folder. So let’s see how to create a Gallery Widget using Ninja Drive.
Before You Begin
- Ninja Drive is installed and activated — see How to Install and Activate Ninja Drive FREE Version
- A Google account is connected — see How to Link Your Google App with the Ninja Drive Plugin
- Your images are stored in a Google Drive folder that you can access from WordPress
Step 1: Open the Widget Builder & Add a New Widget
- Go to your WordPress dashboard, click Ninja Drive in the sidebar, then click Widget Builder.
- Click Add New Widget at the top right of the Widget Builder page.

Step 3: Select Gallery as the Widget
From the widget type selector, choose Gallery.

Step 3: Select Source From Google Drive
After selecting Gallery, you will land in the source tab. From here, select the files that you want to show in the Gallery.

Step 4: Configure the Gallery Settings
Fill in the configuration options:

Configuration Tab
- Automatic File Fetching: Turn on this option to fetch new files automatically
- Password Protection: Set any password for the widget.
- Filter Your File: You can filter all your selected files, which will show or which will not.
Style Tab
- Default View Style: Choose your preferred gallery style from Grid, Masonry, Mosaic, Hover Reveal, or Polaroid.
- Image Quality: Select the image quality for your gallery: Original, Large, Medium, or Thumbnail.
- Show Overlay: Enable this option to access additional settings, including Show File Serial Number, Show File Name, and Show File Description.
- Gallery Spacing & Items: Customize the gallery spacing, number of columns, and corner radius.
- Layout: Configure the gallery layout, including image height, width, and other display settings, such as the number of images to show on the initial load.
Permission Tab
- Preview – Allow users to see your images in a lightbox.
- Download Files – Allow users to download files directly to their device.
Notification Tab
Notification For: Notifications will be sent whenever users trigger the selected actions below.
Step 5: Save and Copy the Shortcode
Click Save. Ninja Drive generates a unique shortcode for this gallery widget:
[ninja_drive id="*"]
Copy the shortcode. You can create multiple gallery widgets pointing to different Drive folders and use them independently across your site.
Step 6: Embed the Gallery on a Page or Post

Paste the shortcode into any page, post, or widget area:
- Gutenberg: Add a Shortcode block and paste the shortcode inside.
- Classic Editor: Switch to the Text tab and paste the shortcode directly in the content.
- Elementor: Add a Shortcode widget and paste it inside.
💡 Tip: The gallery updates automatically when you add, remove, or rename images in the connected Google Drive folder — no need to update the shortcode or page.



