Skip to content

Phase 1 Templates: Build, Rework & Pattern Naming Convention (LS-1226)#11

Merged
brandonmarshal merged 8 commits into
developfrom
feature/LS-1226-phase-1-templates-and-patterns
Jul 17, 2026
Merged

Phase 1 Templates: Build, Rework & Pattern Naming Convention (LS-1226)#11
brandonmarshal merged 8 commits into
developfrom
feature/LS-1226-phase-1-templates-and-patterns

Conversation

@brandonmarshal

Copy link
Copy Markdown
Collaborator

Summary

  • Reframed LS-1226 from a DB-level dedupe task to building/reworking ls-theme's Phase 1 templates and standardizing pattern naming across the theme (see issue for full history).
  • Renamed 9 existing patterns to a section- prefix so freely-insertable section patterns are visually distinct from full-page template patterns and page-scoped content patterns.
  • Extracted front-page.html, index.html, page.html, single.html, and archive.html into dedicated pattern files — every template body is now a single wp:pattern injection. No existing template/part slugs changed.
  • Built out archive.html's main content (previously rendered nothing at all).
  • Built 3 new templates: Page (No Title) (registered in theme.json customTemplates), Search Results, and a shared Taxonomy template covering all 4 Portfolio taxonomies.
  • Fixed a footer bug (invalid nested block) that broke editor parsing on every template, and a theme.json gap (contentSize/wideSize never defined) that made every "constrained" layout render full-bleed.
  • Dropped a proposed Single Project template — not required by the PRD, and its dynamic "related case studies" section needs a custom block rather than a static pattern; documented in the issue rather than built.
  • Follow-up data migration for 58 dev pages still assigned the old no-title template slug tracked separately as LS-1323.

Full findings, decisions, and reasoning are logged on LS-1226.

Test plan

Static checks:

  • php -l clean on all pattern files
  • theme.json valid JSON
  • No stale references to any renamed pattern slugs anywhere in the theme
  • Every wp:pattern slug referenced in a template resolves to exactly one real pattern file
  • Diffed against develop — confirmed no existing template/part filename was removed or renamed

Verified live on a local WordPress instance (Studio), not just statically:

  • archive.html confirmed rendering real content on a live category archive (was blank before this branch)
  • page-no-title confirmed registered and selectable via Page Attributes, renders full-width with no title
  • search.html confirmed rendering search results, search field, and correct content-width breadcrumbs
  • Taxonomy template confirmed live at /portfolio-industry/elearning/ — breadcrumbs, title, and case study listing all correct
  • Footer fix confirmed live (dynamic site name renders correctly, no editor "invalid content" error)
  • Breadcrumbs content-width fix confirmed live across every template that uses it

🤖 Generated with Claude Code

Renames 9 pattern files (and their internal Slug headers) so freely-insertable
section patterns lead with "section-" instead of trailing it, per the new
theme-wide pattern naming convention:

- cta-section.php -> section-cta.php
- statsgrid.php -> section-stats-grid.php
- cta/cta-consultation-{band,inline,reassurance,strip}.php ->
  cta/section-cta-consultation-{band,inline,reassurance,strip}.php
- cards/card-{feature,services,solutions}.php ->
  cards/section-card-{feature,services,solutions}.php

None of these slugs were referenced elsewhere in the theme, so no template,
part, or other pattern needed updating.
Reduces index.html, page.html, single.html, and front-page.html to
header/part calls plus 1-line pattern injections, per the new template
structure convention. No template slugs changed.

New patterns:
- template-index.php   — blog index query loop
- template-page.php    — default page title/content
- template-single.php  — single post title/date/content
- front-page-latest-posts.php — front page's latest-posts section
  (kept separate from template-index.php despite currently identical
  markup, since front-page is expected to diverge as its own homepage
  design over time)
Adds patterns/template-archive.php (query-title, term-description, and a
paginated post query loop matching the blog index card style) and reduces
templates/archive.html to header/breadcrumbs/footer + a 1-line pattern
inject. Fixes the attribute inconsistency flagged in the original LS-1228
investigation (header/footer template-part calls now include
theme:"ls-theme" + area, matching page.html/single.html). No template
slug changed.

Also fixes patterns/footer.php: a wp:site-title block comment was
incorrectly nested inside a wp:paragraph's raw HTML, which is invalid
block markup and caused every template using the footer (i.e. all of
them) to show a "Block contains unexpected or invalid content" error in
the editor. Replaced with a plain PHP call to get_bloginfo('name'),
consistent with how other patterns in the theme already output dynamic
values.
Adds patterns/template-page-no-title.php (full-width main + full-width
post-content, no title block) and templates/page-no-title.html (header +
breadcrumbs + 1-line pattern inject + footer). Breadcrumbs kept in for
now, pending visual review.

Registers the template in theme.json customTemplates (name:
"page-no-title", postTypes: ["page"]) so it's selectable via Page
Attributes.

Note: dev's DB has 58 pages currently assigned to a "no-title" template
slug from a retired theme — that doesn't match this template's
"page-no-title" slug, so those pages won't pick this up automatically.
Follow-up data migration needed, tracked separately outside LS-1226.
… Title (LS-1226)

Adds patterns/template-search.php (query-title, search field, and a
paginated results query loop matching the blog index card style) and
templates/search.html (header + breadcrumbs + 1-line pattern inject +
footer). No theme.json registration needed — search.html is a core
template hierarchy slug.

Fixes theme.json: settings.layout had no contentSize/wideSize defined
at all, so every "constrained" layout in the theme (every template
built so far) had nothing to actually constrain to and silently
rendered full-bleed. Adds contentSize: "800px" and wideSize: "1370px"
to match the design system's Figma values. This is a site-wide fix,
not scoped to any one template.

Fixes patterns/breadcrumbs.php: removes the unnecessary "align":"full"
on the wrapping group, since the theme's own header/main/footer never
use full-bleed either — keeps breadcrumbs consistent with the rest of
the layout now that contentSize is actually defined.

Removes the breadcrumbs template-part from templates/page-no-title.html
— this template is intentionally full-width/hero-first, so a
breadcrumb trail doesn't apply the same way it does on standard
content pages.
Adds patterns/template-taxonomy.php (query-title + term-description +
a paginated case-study query loop, postType: ls_plugin_portfolio,
inherit:true) and templates/taxonomy.html (header + breadcrumbs +
1-line pattern inject + footer).

taxonomy.html is WordPress's shared fallback template for any custom
taxonomy archive without a more specific taxonomy-{slug}.html file, so
this one template automatically serves every term across all 4
Portfolio taxonomies (Industry, Project types, Service, Software) —
no per-taxonomy duplication needed.

Confirmed working on the live front end at
/portfolio-industry/elearning/ — breadcrumbs, title, and case study
listing all render correctly at the correct content width.
@brandonmarshal brandonmarshal added area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration priority:normal Default priority for most issues. labels Jul 16, 2026
@linear-code

linear-code Bot commented Jul 16, 2026

Copy link
Copy Markdown

LS-1226

@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request restructures the theme's templates by extracting main content blocks into dedicated PHP pattern files, renaming section-level patterns with a "section-" prefix, and adding new templates for search, taxonomy, and a no-title page layout. It also resolves block parsing and layout issues in the footer and breadcrumbs, and updates "theme.json" with content size configurations. The review feedback highlights multiple instances of hardcoded user-facing strings and block attributes across the new template patterns, recommending the use of WordPress translation functions to support proper internationalization (i18n).

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread patterns/front-page-latest-posts.php Outdated
Comment thread patterns/template-archive.php Outdated
Comment thread patterns/template-index.php Outdated
Comment thread patterns/template-search.php Outdated
Comment thread patterns/template-search.php Outdated
Comment thread patterns/template-taxonomy.php Outdated
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@brandonmarshal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 246ef1fc-d96d-482f-8501-fc01ec645b6d

📥 Commits

Reviewing files that changed from the base of the PR and between 2cee433 and dba474c.

📒 Files selected for processing (29)
  • CHANGELOG.md
  • patterns/breadcrumbs.php
  • patterns/cards/section-card-feature.php
  • patterns/cards/section-card-services.php
  • patterns/cards/section-card-solutions.php
  • patterns/cta/section-cta-consultation-band.php
  • patterns/cta/section-cta-consultation-inline.php
  • patterns/cta/section-cta-consultation-reassurance.php
  • patterns/cta/section-cta-consultation-strip.php
  • patterns/footer.php
  • patterns/front-page-latest-posts.php
  • patterns/section-cta.php
  • patterns/section-stats-grid.php
  • patterns/template-archive.php
  • patterns/template-index.php
  • patterns/template-page-no-title.php
  • patterns/template-page.php
  • patterns/template-search.php
  • patterns/template-single.php
  • patterns/template-taxonomy.php
  • templates/archive.html
  • templates/front-page.html
  • templates/index.html
  • templates/page-no-title.html
  • templates/page.html
  • templates/search.html
  • templates/single.html
  • templates/taxonomy.html
  • theme.json

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "version"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/LS-1226-phase-1-templates-and-patterns

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brandonmarshal brandonmarshal self-assigned this Jul 16, 2026
Wraps hardcoded user-facing strings in translation functions, matching
the esc_html__()/esc_attr__() convention already used throughout the
theme (e.g. home-hero.php, section-card-feature.php):

- template-archive.php, template-index.php, front-page-latest-posts.php,
  template-taxonomy.php: "no results" messages
- template-search.php: "no results" message + the wp:search block's
  label/buttonText attributes

@ZaredRogers ZaredRogers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @brandonmarshal

@brandonmarshal
brandonmarshal merged commit 31a4e9a into develop Jul 17, 2026
5 of 7 checks passed
@brandonmarshal
brandonmarshal deleted the feature/LS-1226-phase-1-templates-and-patterns branch July 17, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration priority:normal Default priority for most issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants