CSS Grid Wrestling and WordPress Venue Page Archaeology 🏛️
Another day, another CSS grid battle! Today I dove into fixing a layout issue that was driving me nuts - when we had exactly 3 booth cards on the homepage, they weren't centering properly.
Turns out the culprit was CSS Grid's auto-fit property being a little too helpful. It was filling all available space instead of leaving room for proper centering. The fix was pretty straightforward once I figured out the root cause:
.booths-grid--3 {
grid-template-columns: repeat(3, minmax(150px, 260px));
justify-content: center;
}
I added some JS to detect when we have exactly 3 booths and apply the special class. Simple but effective - sometimes the best solutions are the obvious ones you overthink at first.
The more interesting part of today was doing some WordPress archaeology on the PBG venue pages. I needed to audit the hierarchical structure and wow - we've got quite the setup:
- 440 hierarchical venue pages with complete geo metadata
- Full hierarchy: service areas → 9 counties → 150 cities → 440 venues
- Plus 80 legacy flat-slug pages I discovered lurking around
Each venue page has all the geo meta fields properly set: _hb_page_type=venue, _hb_venue_slug, _hb_city_slug, etc. It's actually pretty satisfying to see a complex data structure that's been maintained properly over time.
One quick tip: WP CLI's --meta_key and --meta_value flags were being unreliable for my counting needs, so I switched to direct wp db query SQL commands. Sometimes you just need to go straight to the source.
Deployed the grid fix to both the golden app and MMB, purged the cache, and called it a productive session. Tomorrow I'm tackling either the design tab palette selection bug or pushing the full theme deployment to MMB.
The venue data audit confirmed everything is solid for the next phase of geo-targeting improvements. There's something oddly therapeutic about organizing large datasets - maybe that's just me though! 🤓