Free
The [foliora] shortcode — full reference
Every attribute of [foliora], with defaults, accepted values and copy-ready examples.
On this page
The shortcode works in the classic editor, the Shortcode block, widgets, page builders and PHP templates. The block and the page-builder widgets use the same renderer, so the output is identical.
[foliora file="https://example.com/wp-content/uploads/report.pdf"]
Attributes#
Empty yes/no attributes fall back to the site default on Foliora → Settings.
| Attribute | Values | Default | What it does |
|---|---|---|---|
file | URL | — | The PDF to show. Required unless id is set. |
id | number | — | Use a saved embed from the Shortcode Builder. Attributes you add still win. |
view | page, scroll, spread, flip | page | Single page, continuous scroll, two-page spread or 3D flipbook. More |
width | CSS size | Settings (100%) | e.g. 100%, 800px. |
height | CSS size | Settings (600px) | e.g. 600px, 80vh. |
page | number | 1 | Start page. |
title | text | — | Optional caption / accessible name. |
theme | light, dark, sepia | Settings | Reading theme. More |
download | true / false | Settings | Download button. |
print | true / false | Settings | Print button. |
search | true / false | Settings | Find in document. |
share | true / false | Settings | Share dialog. |
theme_btn | true / false | Settings | Light / dark / sepia toggle. |
shortcuts | true / false | Settings | Keyboard shortcuts guide (?). |
presentation | true / false | Settings | Presentation mode button. |
fullscreen | true / false | Settings | Full-screen button. |
hide | comma list | — | Hide controls: nav, zoom, fit, rotate, view, pan, download, print, search, theme, share, shortcuts, presentation, fullscreen. |
loading | eager, lazy | Settings | Lazy loading starts the viewer only when it scrolls into view. |
hash | true / false | true | Keep #page=N in the address bar in sync. |
resume | true / false | true | Reopen on the last page this visitor read. |
mode | pdf | pdf | Reserved for add-ons. Foliora Pro opens .epub files automatically. |
Attributes added by Foliora Pro#
| Attribute | Values | What it does |
|---|---|---|
popup | true | Open in a lightbox instead of inline. Lightbox |
trigger | button, link, cover | What opens the lightbox. |
label | text | Text of the lightbox button or link. |
lead | page number or off | Ask for an email at that page, or never for this embed. Lead capture |
Recipes#
A catalogue as a flipbook#
[foliora file="…/catalogue.pdf" view="flip" height="80vh"]
View only — no download or print#
[foliora file="…/policy.pdf" download="false" print="false"]
Hiding the buttons does not stop a visitor from saving the file through the browser. To really protect a document use Secure Mode (Pro).
A minimal toolbar#
[foliora file="…/menu.pdf" hide="rotate,pan,view,shortcuts,presentation" share="false"]
Dark reader that opens on page 4#
[foliora file="…/ebook.pdf" view="scroll" theme="dark" page="4"]
In a PHP template#
<?php echo do_shortcode( '[foliora file="' . esc_url( $pdf_url ) . '" view="flip"]' ); ?>
PDFs from other websites#
A PDF on another domain loads only if that server allows it with CORS (Access-Control-Allow-Origin). Otherwise Foliora shows a clear message with a direct link. Files in your own Media Library always work. See Troubleshooting.