Browse Source

phase 3 (branch): flip to block theme (hybrid)

Add templates/index.html → wp_is_block_theme() now true. Hybrid behavior verified:
most-specific template wins, ties go to the block template. So generic content
(posts/search/404/blog/generic pages) now renders via the block templates, while
homepage (front-page.php), page-{slug}.php, and category/tag.php stay classic
(more specific) until migrated. Health-swept: 200, no fatals.

Decision: embrace block styling for generic pages. Migration is now incremental
(author templates/page-{slug}.html → tie-beats the classic file → delete classic).
main stays fully classic; this is all on the fse-migration branch.
windhamdavid 1 week ago
parent
commit
b7055760e5
2 changed files with 47 additions and 0 deletions
  1. 17 0
      _claude/notes/upgrade-plan.md
  2. 30 0
      templates/index.html

+ 17 - 0
_claude/notes/upgrade-plan.md

@@ -136,6 +136,23 @@ Considering moving the whole site from **davidawindham.com → davidwindham.com*
 
 
 ## Changelog
 ## Changelog
 
 
+- **2026-06-19** — **Phase 3 (branch `fse-migration`): FLIPPED to a block theme (hybrid).** Added
+  `templates/index.html` (Query Loop) → `wp_is_block_theme()` is now true. **Key mechanic (verified
+  by experiment):** WordPress picks the **most-specific** template; **on a tie the block template
+  wins**. So with our generic block templates present:
+  - **Block-rendered now:** posts (`single.html` ties+beats `single.php`), search, 404, blog index,
+    and *generic* plain pages (`page.html`). Verified 200, no fatals.
+  - **Still classic (more-specific wins):** homepage (`front-page.php` > `index.html`), `page-{slug}.php`
+    (studio/about/now/… > `page.html`), and `category.php`/`tag.php` (> generic `archive.html`).
+  - **Decision (user):** *embrace block styling* — generic pages adopt theme.json/core block styling
+    (plainer than the old Bootstrap `.entry-content` look; that's accepted). Comment form needs a look
+    (didn't render on a closed-comments post). Header/footer chrome stays Bootstrap (via the parts).
+  - **Migration is now incremental + safe:** to convert a page, author `templates/page-{slug}.html`
+    (tie-beats its `page-{slug}.php`), verify, then delete the classic file. `main` is still fully
+    classic — all this lives on the `fse-migration` branch.
+  - **Next:** refine the generic block templates to read cleanly; migrate the bespoke `page-*.php`
+    (studio/about/art/now/music/desk/archive/contact/analytics/sitemap) one at a time.
+
 - **2026-06-19** — **Phase 3: header → FSE template part too.** Same bridge pattern as the footers:
 - **2026-06-19** — **Phase 3: header → FSE template part too.** Same bridge pattern as the footers:
   the header chrome (navbar + offcanvas nav) now lives in `parts/header.html`; `header.php` keeps
   the header chrome (navbar + offcanvas nav) now lives in `parts/header.html`; `header.php` keeps
   only the document `<head>` + `wp_head()` + `<body>` open (can't go in a block part) and then calls
   only the document `<head>` + `wp_head()` + `<body>` open (can't go in a block part) and then calls

+ 30 - 0
templates/index.html

@@ -0,0 +1,30 @@
+<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
+
+<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
+<main class="wp-block-group">
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
+	<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
+		<!-- wp:query {"queryId":0,"query":{"inherit":true,"perPage":10},"layout":{"type":"constrained"}} -->
+		<div class="wp-block-query">
+			<!-- wp:post-template -->
+			<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
+			<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)">
+				<!-- wp:post-title {"level":2,"isLink":true} /-->
+				<!-- wp:post-date {"fontSize":"x-small"} /-->
+				<!-- wp:post-excerpt /-->
+			</div>
+			<!-- /wp:group -->
+			<!-- /wp:post-template -->
+			<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
+			<!-- wp:query-pagination-previous /-->
+			<!-- wp:query-pagination-numbers /-->
+			<!-- wp:query-pagination-next /-->
+			<!-- /wp:query-pagination -->
+		</div>
+		<!-- /wp:query -->
+	</div>
+	<!-- /wp:group -->
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer-home","tagName":"footer"} /-->