When a visitor clicks a Gallery cover inside an Album, FotoGrids can swap the Gallery into place without a full page reload. The Album wrapper stays where it is, the chosen Gallery slides in, and a Back button returns the visitor to the Album — all on the same page, with the browser scroll position preserved.
Location Album Settings → Navigation → AJAX Navigation
What it does #
With AJAX transitions on, clicking an Album cover does this:
- FotoGrids sends a quiet request to the site for the chosen Gallery’s rendered HTML.
- Any stylesheets the Gallery needs that the Album page hasn’t already loaded are added on the fly.
- The Gallery’s HTML replaces the Album’s contents inside the same wrapper.
- A Back button appears above the Gallery so the visitor can return to the Album without leaving the page.
The transition is silent and instant on most sites. No full reload, no flash of unstyled content, no scroll jump.
With AJAX transitions off, each Album cover behaves like a normal link — clicking it navigates the browser to the Gallery’s own page.
Setting #
| Setting | Smooth Album to Gallery Transitions |
| Options | on off |
| Default | on |
When this setting is off, Album covers navigate to each Gallery’s View Page as a regular link. Turn it off if you prefer traditional page navigation, or if a theme or plugin on your site interferes with in-page content swaps.
Graceful fallback #
The AJAX swap is layered on top of a real link, not in place of one. Every Album cover is wrapped in an <a> tag pointing at the Gallery’s View Page. This means:
- Middle-click, Cmd-click, Ctrl-click — opens the Gallery’s View Page in a new tab, as expected.
- JavaScript disabled or blocked — the click follows the link to the Gallery’s View Page.
- Network or server failure mid-swap — FotoGrids falls back to navigating to the Gallery’s View Page automatically.
Visitors always end up on the right Gallery, whether the swap succeeds or not.
The fallback link also carries a ?fg_via= parameter so the destination View Page knows which Album the visitor came from. Breadcrumbs and the in-page Back button use this to point back to the right Album.
The Back button #
When the swap completes, the Gallery renders inside the Album wrapper with a Back button at the top. Clicking it restores the Album exactly as it was — same covers, same scroll position, same filter selections. The visitor never leaves the page.
The Back button only appears when the visitor arrived at the Gallery via an AJAX swap. Visitors who land on a Gallery directly (from a shared link, a search result, or by typing the URL) see the Gallery on its own View Page with the normal site chrome.
When to turn it off #
AJAX transitions work on every standard WordPress theme, but a small number of sites have configurations that conflict with in-page content swaps. Consider turning the setting off if:
- A theme or page builder injects layout JavaScript that doesn’t re-run on dynamically inserted content.
- A caching or optimisation plugin strips inline assets in a way that breaks the swap.
- Your design intentionally treats each Gallery as a standalone page (for analytics, SEO routing, or per-page tracking).
With the setting off, every Album cover behaves like a standard link, and the Gallery loads as a fresh page navigation.
Related settings #
Two Navigation settings work together with AJAX transitions to shape the in-page experience:
- Show Breadcrumbs — adds a clickable Album → Gallery trail above the swapped-in Gallery.
- Show Breadcrumbs On — when the Embedded Galleries option is selected, breadcrumbs appear inside the AJAX-swapped Gallery in addition to standalone View Pages.