Dang, it's kinda fun playing around with GoDaddy's Go theme and CoBlocks plugin!

Follow

Also trying out on-the-fly theme switching in combination with my tiny domain mapping plugin. Now, as Go supports so many theme options, you could make quite a few different child themes with zero code. (And apply these to different pages. Like multisite, but different, because each page is still part of that single site, and you could easily combine them all back together, and all settings are right there in the same place.)

The active theme is referenced all over, over the course of a single WordPress request, and also before `url_to_postid()` reliably works, so calling that function shouldn't be done until after a certain point in time. These guys got that figured out. plugins.trac.wordpress.org/bro

Show thread

Same thing, I imagine, with `get_queried_object_id()`. For now, I explicitly mapped certain URLs to a specific ("inactive") theme, in a "site option" rather than a per-post setting using custom fields. (Simple solutions rock.)

Show thread

Played with this a little more, and while menus and widgets don't always appear as intended, it works great with Go and "completely empty" child themes (each with their own Customizer settings). Fully customizable, "single-site" (!) landing page goodness.

Show thread

That's different pages with different Customizer setting but the same base theme. What if I wanted the _same_ Customizer settings (think widgets, menus), but different (PHP, CSS, whatever) files? Well ... wordpress.stackexchange.com/a/ (Okay, so nobody would ever do that. They'd use custom CSS and Page Templates. But, still.)

Show thread

Revisited things and decided to go with these guys’ approach. One problem is custom post types are often registered on `init`, after the (main) theme’s `functions.php` has already been included. So it’ll come with a major disclaimer: “No CPT support, unless you’re willing to use custom code that registers them before (or at) `setup_theme`.” Still meets the original goal—crazy simple custom landing pages. 🤷

Show thread

Maybe that hard URL-based approach wasn’t without merit after all.

Show thread
Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!