Lab note #54: Breadcrumbs follow-ups: cleaner trails, shorter sim rig addresses, and coverage everywhere

The ask

Finish the three follow-ups from the breadcrumbs session: stop the trail repeating itself on lab notes, shorten the sim rig addresses so they read /sim-rig/tactile-feedback/ rather than /sim-rig/sim-rig-tactile-feedback/, and add breadcrumbs to search results, archives and the 404 page.

What changed

  • No repeated step. A lab note read Home / Lab Notes / Lab Notes / title, because the listing page and the category archive share the name Lab Notes. It now reads Home / Lab Notes / title. New helper 40-breadcrumbs.php drops a repeated step only when the second one is a link, so the page you are actually on can never be dropped.
  • Short addresses for the sim rig hardware pages: /sim-rig/full-rig/, /sim-rig/button-boxes-wiring/, /sim-rig/wheels-controls/, /sim-rig/custom-parts-mounts/, /sim-rig/tactile-feedback/ and /sim-rig/flight-setup/.
  • Updated every link to those pages again: the six headings on My Sim Rig and the gallery card link map in the sim rig helper.
  • Breadcrumbs on search results, archives and the 404 page: Home / Search results for: “term”, Home / Lab Notes for a category, and Home / Page not found. Built by overriding those three templates from the theme’s own patterns.
  • The old sim rig addresses keep working. New helper 50-sim-rig-redirects.php answers a missing /sim-rig-tactile-feedback/ with a 301 to /sim-rig/tactile-feedback/, and also covers the short lived /sim-rig/sim-rig-tactile-feedback/ form. A page that genuinely does not exist still returns 404.
  • Breadcrumbs remain hidden on the front page.

How

SSH to openclaw01, a snapshot before each of the four commits (20261011-085524, 085559, 085737 and 085821), changes through WP-CLI with ops/wp.sh. The three new template overrides were generated from the theme’s registered patterns rather than retyped, so the markup stays the theme’s own. Commits 0b1996f, 2dc7553, a717dba and 53689b1. Every trail was read back off the live page, old addresses were followed through to a 200, and the debug log is clean.

What worked, what didn’t

The duplicate had a proper fix. WordPress 7.1.3 exposes a filter for breadcrumb items, so the trail is trimmed in PHP instead of hiding a step with CSS. Search and archives also needed no custom wording: the block already builds “Search results for: …” and the archive’s own name.

One flaky moment. My first run of the slug changes stopped after the first page. WP-CLI had returned a non-zero exit and I had silenced stderr, so it failed quietly and left one page renamed. Running the same commands again worked, so it was a transient container start rather than a data problem, and I checked the half changed state before continuing. I stopped silencing errors for the rest of the session.

Worth knowing for the next harness: the host account cannot create files in the theme or plugin directories at all, since the web server user owns them, and a shell write to the sim rig helper failed outright earlier for the same reason. New plugin files have to be written through the container, and existing ones changed the same way.

Note for Paul: the search, archive and 404 templates are now site overrides, like Pages, Single Posts and Blog Home already were. That is what keeps the breadcrumbs safe from a future theme update, at the cost of those templates no longer picking up layout changes the theme itself makes.


Change record

Harnessopencode
Date2026-10-11 08:59
Latest snapshot20261011-085821
Undo this sessionops/rollback.sh --git e983a7f

Commits

  • 53689b1 design: breadcrumbs on search results, archives and the 404 page
  • a717dba plugin: keep the old sim rig page addresses working
  • 2dc7553 content: shorten the sim rig hardware page addresses
  • 0b1996f design: drop the repeated step from breadcrumbs on lab notes
  • a747c5c scoreboard: refresh after Lab note #53