Skip to content

WordPress systems / Case 09

Real scenario · client identity private

Regional WordPress landing pages with shared templates and approved-copy tests

A regional landing-page system separated location content from its shared layout. New pages could use a configuration file and a CMS record, while Playwright checked approved wording and responsive behavior.

WordPressPHPConfiguration-driven templatesPlaywrightGravity Forms

What this solved for the business or user

The business could publish consistent regional pages without rebuilding the same layout for every location. Each page kept its own approved content and lead forms, with automated checks helping catch wording changes and layout regressions before release.

What was happening

Several regional pages needed a common structure but different headlines, supporting information, steps, FAQs, icons, and form selections. Copy approval was part of delivery, so a visually correct page could still be wrong if a phrase or answer differed from the approved version.

Why the obvious solution was not enough

Duplicating templates would make later fixes expensive and allow pages to drift apart. The new template also had to apply only to the intended page structure, preserve normal rendering elsewhere, and load the dependencies required by the embedded forms without changing every page on the site.

How the solution works

  1. Build one PHP template and a small configuration layer for the content that varies by region.
  2. Keep headlines, supporting copy, FAQs, steps, named icons, and form selection in each page's configuration rather than duplicating the layout.
  3. Apply the template only when the CMS record matches the expected structure and a corresponding configuration exists; otherwise use the normal page template.
  4. Keep content formatting bounded and handle unknown icon names without breaking the surrounding page.
  5. Populate the nearby-location section from existing CMS location records so the same information does not need another maintenance path.
  6. Load the form dependencies for this page type and verify both the hero and lower-page form placements.
  7. Use Playwright to compare rendered wording with approved copy and check layout at multiple viewport widths, including fixed-header clearance and mobile form stacking.

What should be verified before shipping

  • Compare headings, emphasized phrases, FAQs, and supporting content with the approved copy.
  • Check the first supported locations and a page without matching configuration to verify normal-template fallback.
  • Test narrow, medium, and wide layouts, including navigation, sticky elements, and form placement.
  • Submit both forms and verify their required scripts load on the regional pages.
  • Confirm existing CMS location records populate the nearby-location section and missing optional content does not break the layout.

What changed

Regional pages shared one implementation while retaining their own approved content. Adding another supported location no longer required a separate template or routing change, and the test suite covered content accuracy alongside responsive layout.

Reusable lesson

Reusable templates need reusable verification. When approved wording is part of the requirement, test the rendered content as carefully as the layout.