The ask
I added gallery photos and wanted the cards refreshed, with counts based on the actual galleries.
What changed
- All six cards now read their photo counts and covers directly from FooGallery.
- Current counts: Full Rig 19, Button Boxes & Wiring 13, Wheels & Controls 60, Custom Parts & Mounts 0, Tactile Feedback 78, Flight Setup 10.
- Empty galleries show Photos coming soon. Covers use the gallery featured image or first photo.
How
Used SSH and WP-CLI, captured uploads, took snapshots, added a small site plugin and replaced the cards’ manual counts and covers with dynamic shortcodes.
What worked / what didn’t
Verified all six counts and five photo covers in the rendered page, and confirmed the plugin loads. The first installation attempt could not access a temporary source file inside WP-CLI; embedding the source corrected that before the page was changed. Browser visual verification was not performed.
Change record
| Harness | codex |
| Date | 2026-10-10 14:03 |
| Latest snapshot | 20261010-140304 |
| Undo this session | ops/rollback.sh --git 020c401 |
Commits