Phase 1 Templates: Build, Rework & Pattern Naming Convention (LS-1226)#11
Conversation
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.
… layout adjustments, and bug fixes
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
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.
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (29)
Note
|
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
left a comment
There was a problem hiding this comment.
Looks good @brandonmarshal
Summary
ls-theme's Phase 1 templates and standardizing pattern naming across the theme (see issue for full history).section-prefix so freely-insertable section patterns are visually distinct from full-page template patterns and page-scoped content patterns.front-page.html,index.html,page.html,single.html, andarchive.htmlinto dedicated pattern files — every template body is now a singlewp:patterninjection. No existing template/part slugs changed.archive.html's main content (previously rendered nothing at all).theme.jsoncustomTemplates), Search Results, and a shared Taxonomy template covering all 4 Portfolio taxonomies.theme.jsongap (contentSize/wideSizenever defined) that made every"constrained"layout render full-bleed.no-titletemplate slug tracked separately as LS-1323.Full findings, decisions, and reasoning are logged on LS-1226.
Test plan
Static checks:
php -lclean on all pattern filestheme.jsonvalid JSONwp:patternslug referenced in a template resolves to exactly one real pattern filedevelop— confirmed no existing template/part filename was removed or renamedVerified live on a local WordPress instance (Studio), not just statically:
archive.htmlconfirmed rendering real content on a live category archive (was blank before this branch)page-no-titleconfirmed registered and selectable via Page Attributes, renders full-width with no titlesearch.htmlconfirmed rendering search results, search field, and correct content-width breadcrumbs/portfolio-industry/elearning/— breadcrumbs, title, and case study listing all correct🤖 Generated with Claude Code