Put the portal on a page
You show the portal by adding the shortcode [nopd_drive_portal] to a page. A shortcode is a short code in square brackets that WordPress replaces with the plugin's content when the page is displayed. Each user sees only their own folders, so one page is enough for everybody.
Add the portal to a page
With the block editor (Gutenberg)
- Go to Pages > Add New Page (or open an existing page).
- Give the page a title, for example Private area.
- Click the + button to add a block, search for Shortcode and choose it.
- Type or paste
[nopd_drive_portal]in the block. - Click Publish.
With Elementor
- Edit the page with Elementor.
- Drag the Shortcode widget into the page.
- Paste
[nopd_drive_portal]in the widget and click Publish (or Update).
With the classic editor
Paste [nopd_drive_portal] in the text of the page and click Publish.
The plugin page has a box Put the portal on a page with a Copy button for the shortcode and a full example.
Shortcode attributes
Attributes are optional settings written inside the brackets, like view="grid".
| Attribute | Values | What it does |
|---|---|---|
root | A rule ID, for example 2 | Shows only the folder of that rule (the number in the ID column of step 3). If omitted, the portal shows every folder the user can access. Users without that rule see the "no folder" message. |
view | list (default) or grid | Starting layout. Grid is Pro: without a licence it falls back to list. |
theme | light (default), dark or auto | auto follows the visitor's device setting. Dark and auto are Pro: without a licence the portal stays light. |
title | Any text | Title in the coloured bar at the top of the portal. |
subtitle | Any text | Line of text under the title. |
height | A CSS height, for example 600px | Maximum height of the scrolling area. |
Full example:
[nopd_drive_portal view="grid" theme="auto" title="Project documents" subtitle="Updated automatically from Google Drive" height="620px"]
The old shortcode [lr_drive_portal] still works, so pages created with earlier versions do not need to change.
What users see
- Logged-out visitors see the message You need to sign in to view the private documents. (you can change it, see Appearance and settings). Add a login link or a login form on the same page so they can sign in.
- Users with more than one folder get a drop-down menu to switch folder.
- The toolbar has a Refresh button and, in Pro, a search field and a list/grid switch.
If your theme has a fixed header
If the site header stays on top while scrolling and covers the portal, give the portal its own scrolling area with height, for example [nopd_drive_portal height="620px"]. The search bar then stays visible and only the file list scrolls.
Page cache
The page with the portal is marked as not cacheable, because its content depends on who is logged in. Most cache plugins respect this. If you use a cache at server, proxy or CDN level (for example Cloudflare page rules), exclude this page there too.
Write to us and tell us which plugin, what you tried and what you see. We answer from Italy, usually within one working day.