--- phase: 01-acf-migration-2707 plan: 01 type: execute wave: 1 depends_on: [] files_modified: - wp-content/themes/ostal_WP/sections.php - wp-content/themes/ostal_WP/page-2707.php - wp-content/themes/ostal_WP/template-parts/sections/section-collaboration-steps.php - wp-content/themes/ostal_WP/migrate-2707.php autonomous: false delegation: off --- ## Goal Migrate hardcoded content from `page-2707.php` (Ogrody zimowe — klienci indywidualni) to ACF Flexible Content, making all text, images, and sections editable from WordPress admin. ## Purpose Currently all content is hardcoded in PHP — any change requires developer intervention. After migration, the client can edit headings, texts, images, and section order directly in WP admin. ## Output - `page-2707.php` rewritten to use ACF Flexible Content via `sections.php` - Missing layouts added to `sections.php` dispatcher - New `section-collaboration-steps.php` partial for the numbered steps section - `migrate-2707.php` one-time script to populate ACF content programmatically ## Project Context @.paul/PROJECT.md @.paul/ROADMAP.md ## Source Files @wp-content/themes/ostal_WP/page-2707.php @wp-content/themes/ostal_WP/sections.php @wp-content/themes/ostal_WP/template-parts/sections/section-hero-with-form.php @wp-content/themes/ostal_WP/template-parts/sections/section-two-col.php @wp-content/themes/ostal_WP/template-parts/sections/section-two-col-with-bg.php @wp-content/themes/ostal_WP/template-parts/sections/section-gallery.php @wp-content/themes/ostal_WP/template-parts/sections/section-boxes_repeater_img_title_text_cta.php ## AC-1: Flexible Content dispatcher complete ```gherkin Given sections.php is loaded on page 2707 When the ACF flexible content field "sections" contains layouts Then hero_with_form, gallery, and collaboration_steps layouts are dispatched to correct template-parts ``` ## AC-2: Collaboration steps layout works ```gherkin Given a "collaboration_steps" layout is added in ACF admin When a repeater with step titles is filled in Then the page renders numbered steps with connecting lines matching the current design ``` ## AC-3: Page 2707 uses Flexible Content ```gherkin Given page-2707.php is loaded When the page renders Then all content comes from ACF fields (no hardcoded text/images remain) And the visual output matches the current hardcoded version when same content is entered in ACF ``` ## AC-4: Migration script populates ACF content ```gherkin Given migrate-2707.php is executed once (via browser or WP-CLI) When the script runs with WordPress and ACF loaded Then all 10 flexible content layouts are created for page 2707 And all text, headings, classes, shortcodes, and image URLs are populated And the page renders with full content without manual data entry ``` Task 1: Add missing layouts to sections.php dispatcher wp-content/themes/ostal_WP/sections.php Add three missing layout dispatchers to the flexible content loop in sections.php: 1. `hero_with_form` → loads `template-parts/sections/section-hero-with-form` 2. `gallery` → loads `template-parts/sections/section-gallery` 3. `collaboration_steps` → loads `template-parts/sections/section-collaboration-steps` Follow the exact same pattern as existing entries (get_row_layout() check + get_template_part). Do NOT modify any existing layout dispatchers. sections.php contains all 11 layout dispatchers (8 existing + 3 new) with no syntax errors AC-1 satisfied: All needed layouts are dispatched from sections.php Task 2: Create collaboration-steps section partial wp-content/themes/ostal_WP/template-parts/sections/section-collaboration-steps.php Create new template partial for the numbered collaboration steps section. ACF sub-fields to use (will need to be registered in ACF admin): - `section_heading` (text) — section title, e.g. "Jak wygląda współpraca?" - `steps` (repeater) with sub-field: - `step_title` (text) — step name - `bottom_text` (textarea) — text below the steps HTML structure must match the current hardcoded version exactly: - Outer: `
` - Inner: `.wrapper.wrapper--inner` > `h2.section-heading.heading--md` - Steps container: `.collaboration-steps` with max-width 900px, margin auto, padding 20px 0 - Each step: `.collaboration-step` with flex layout, gap 20px, margin-bottom 40px (except last) - Step number: `.step-number` — circular green gradient (#88b14b → #6a8f3a), 60x60, white text - Connector line: `.step-connector` — 2px wide, gradient green to gray, between steps (not after last) - Step content: `.step-content` — gray bg (#f8f9fa), 4px green left border, rounded - Bottom text: `.col-text-content.mt-4.text-center` > `

` Move inline styles to classes where possible, but keep them if removing would break existing CSS dependencies. Include the existing hover/responsive CSS from page-2707.php as a