From d389fd7bc83622c5205ab08f92849852f1e70497 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Wed, 1 Jul 2026 10:19:21 -0500 Subject: [PATCH] Fix Task 3 path (page.php is at theme root) and indentation (use tabs) --- .../plans/2026-07-01-inner-page-layout.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/superpowers/plans/2026-07-01-inner-page-layout.md b/docs/superpowers/plans/2026-07-01-inner-page-layout.md index 680c3e9..f7dd4d7 100644 --- a/docs/superpowers/plans/2026-07-01-inner-page-layout.md +++ b/docs/superpowers/plans/2026-07-01-inner-page-layout.md @@ -37,7 +37,7 @@ - `wp-content/themes/community-works-collaborative/acf/group_60bfb84ae973c.json` — Add `hero_image` and `hero_vector` image fields. Bump `modified` timestamp. - `wp-content/themes/community-works-collaborative/styles/blocks/index.css` — Add `@import './page-hero.css';`. - `wp-content/themes/community-works-collaborative/views/partials/page-hero.php` — Read the two new fields. Render `hero_image` and `hero_vector` as absolutely-positioned media layers. Add `.page-hero`, `.page-hero__media`, `.page-hero__vector`, `.page-hero__content` classes. Stop rendering the in-hero `intro` paragraph. -- `wp-content/themes/community-works-collaborative/views/page.php` — Render the page-intro partial between the hero and `the_content` when the `intro` field is non-empty. +- `wp-content/themes/community-works-collaborative/page.php` — Render the page-intro partial between the hero and `the_content` when the `intro` field is non-empty. (Note: `page.php` is at the theme root, not `views/page.php` — WordPress convention. Use tabs to match the existing file and the WordPress coding standard enforced by phpcs.) ### Touched for verification only (no content changes) @@ -211,7 +211,7 @@ git commit -m "Add page-intro partial for centered narrow intro section" ## Task 3: Wire the intro partial into page.php **Files:** -- Modify: `wp-content/themes/community-works-collaborative/views/page.php` +- Modify: `wp-content/themes/community-works-collaborative/page.php` (at the theme root, not `views/page.php` — WordPress convention) **Interfaces:** - Consumes: The `page-intro` partial (Task 2). Reads `get_field( 'intro' )`. @@ -219,11 +219,11 @@ git commit -m "Add page-intro partial for centered narrow intro section" - [ ] **Step 1: Read the current page.php** -Read `views/page.php` to confirm current contents. +Read `page.php` to confirm current contents. Note the indentation style — the existing file uses **tabs** (WordPress coding standard). The brief's code block uses 4-space indentation as a transcription convention; convert to tabs to match the surrounding code. - [ ] **Step 2: Replace page.php with the new version** -Write `views/page.php` to match: +Write `page.php` to match (using **tabs** for indentation): ```php
-
- "> + -
+ // Page body content + if ( have_posts() ) { + while ( have_posts() ) { + the_post(); + the_content(); + } + } + ?> + - - - + + +
@@ -277,13 +277,13 @@ if ( hasSidebar() ) { - [ ] **Step 3: Lint the modified file** -Run: `composer lint -- views/page.php` -Expected: no errors. +Run: `vendor/bin/phpcs page.php` +Expected: 1/1 clean. The pre-existing CRLF EOL errors in unrelated files (per Task 2's report) are out of scope; don't run `composer lint` (full project) for this task. - [ ] **Step 4: Commit** ```bash -git add views/page.php +git add page.php git commit -m "Render page-intro partial between hero and body in page.php" ```