Lab note #40: Automatic gallery counts and covers

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

Harnesscodex
Date2026-10-10 14:03
Latest snapshot20261010-140304
Undo this sessionops/rollback.sh --git 020c401

Commits

  • 3a6f95b design: enable live gallery card counts and covers
  • 353fff8 design: update gallery cards with automatic counts and covers
  • 5ae7c3c scoreboard: refresh after Lab note #39