The FotoGrids Album shortcode lets you embed an Album in any post, page, or widget area that supports shortcodes. It is the most portable way to display an Album — it works in the Classic Editor, in Text widgets, in page builders that pass content through WordPress’s shortcode engine, and anywhere else WordPress processes [shortcode] syntax.
Basic usage #
Replace 123 with the ID of the Album you want to display. The Album ID is shown in the URL when you open the Album editor in wp-admin (e.g. post=123), and in the ID column of the Albums list.
The Album renders its assigned Galleries as cover items. Clicking a cover either opens that Gallery’s standalone view page, or expands the Gallery in place via AJAX — whichever behaviour is set on the Album itself.
Finding the Album ID #
Two quick ways to find an Album’s ID:
- Open the Album in the editor — the URL in your browser contains
post=123where123is the ID. - Go to FotoGrids → Albums in wp-admin. The ID is shown in the list table, and the Copy shortcode button in the row’s actions copies the ready-to-paste
to your clipboard.
Shortcode parameters #
| Parameter | id |
| Value | Album post ID (integer) |
| Required | Yes |
| Parameter | template |
| Options | grid justified masonry |
| Default | grid |
The template parameter overrides the Album’s saved layout for this specific embed without changing the Album’s settings. This is useful when you want the same Album to appear with a different layout in a different context — for example, masonry on a hero page and grid in a sidebar listing.
Unlike the Gallery shortcode, the Album shortcode does not accept per-embed overrides for Lightbox, captions, or lazy-loading. Those are controlled by the Album’s saved settings and apply uniformly wherever the Album is embedded.
Where to paste the shortcode #
Classic Editor — paste the shortcode directly into the post body in Text view, or into the Visual editor (it will remain as text and render on the frontend).
Gutenberg (Block Editor) — add a Shortcode block and paste the shortcode into it.
Text widgets — paste the shortcode into a Text widget in Appearance → Widgets. Make sure the widget type is Text (not Custom HTML) so WordPress processes the shortcode.
Page builders — most page builders (Elementor, Divi, Bricks) have a dedicated Shortcode element or module. Paste the shortcode there.
When the Album renders nothing #
The Album shortcode returns nothing (an empty output) rather than an inline error message in any of these cases:
- The
idparameter is missing or set to0. - No Album exists with that ID.
- The Album’s post status is not
publish. - The Album has no Galleries assigned to it.
If you paste the shortcode and the page shows nothing where the Album should be, work through these in order — check the ID is correct, confirm the Album is published, and open the Album editor to verify it has at least one Gallery assigned.
Tips #
The shortcode renders the Album exactly as configured in the Album editor. Cover style, layout, click behaviour (view page vs. AJAX), spacing, hover effects, and sorting are all respected — no extra configuration is needed at the shortcode level.
If you need the same Album on multiple pages, use the same shortcode on each. There is no limit to how many times an Album can be embedded.