Skip to content
Free

The [foliora] shortcode — full reference

Every attribute of [foliora], with defaults, accepted values and copy-ready examples.

2 min read Updated

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.

AttributeValuesDefaultWhat it does
fileURL—The PDF to show. Required unless id is set.
idnumber—Use a saved embed from the Shortcode Builder. Attributes you add still win.
viewpage, scroll, spread, flippageSingle page, continuous scroll, two-page spread or 3D flipbook. More
widthCSS sizeSettings (100%)e.g. 100%, 800px.
heightCSS sizeSettings (600px)e.g. 600px, 80vh.
pagenumber1Start page.
titletext—Optional caption / accessible name.
themelight, dark, sepiaSettingsReading theme. More
downloadtrue / falseSettingsDownload button.
printtrue / falseSettingsPrint button.
searchtrue / falseSettingsFind in document.
sharetrue / falseSettingsShare dialog.
theme_btntrue / falseSettingsLight / dark / sepia toggle.
shortcutstrue / falseSettingsKeyboard shortcuts guide (?).
presentationtrue / falseSettingsPresentation mode button.
fullscreentrue / falseSettingsFull-screen button.
hidecomma list—Hide controls: nav, zoom, fit, rotate, view, pan, download, print, search, theme, share, shortcuts, presentation, fullscreen.
loadingeager, lazySettingsLazy loading starts the viewer only when it scrolls into view.
hashtrue / falsetrueKeep #page=N in the address bar in sync.
resumetrue / falsetrueReopen on the last page this visitor read.
modepdfpdfReserved for add-ons. Foliora Pro opens .epub files automatically.

Attributes added by Foliora Pro#

AttributeValuesWhat it does
popuptrueOpen in a lightbox instead of inline. Lightbox
triggerbutton, link, coverWhat opens the lightbox.
labeltextText of the lightbox button or link.
leadpage number or offAsk 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.