Skip to content

Switch breadcrumbs pattern to Yoast SEO's native block (LS-1228 Part 2)#10

Merged
brandonmarshal merged 3 commits into
developfrom
feature/LS-1228-breadcrumbs-part-2
Jul 15, 2026
Merged

Switch breadcrumbs pattern to Yoast SEO's native block (LS-1228 Part 2)#10
brandonmarshal merged 3 commits into
developfrom
feature/LS-1228-breadcrumbs-part-2

Conversation

@brandonmarshal

@brandonmarshal brandonmarshal commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the custom ls-plugin/breadcrumbs block reference in patterns/breadcrumbs.php with Yoast SEO's native yoast-seo/breadcrumbs block, inside the same group wrapper/padding.
  • Updates the Requires Plugins theme header in style.css from ls-plugin to wordpress-seo, since the breadcrumbs pattern now depends on Yoast SEO instead of the custom plugin block.
  • Updates CHANGELOG.md to describe the Yoast block adoption.

Background

This supersedes the original LS-1228 Part 2 implementation (previously wired to a custom ls-plugin/breadcrumbs dynamic block). Testing during Part 1 surfaced a real Yoast breadcrumbs bug; rather than fixing it, a fully custom block was built instead. A course-correction (documented in the LS-1228 comment thread) determined Yoast already ships its own breadcrumbs block, so the custom block was dropped entirely from ls-plugin, and this PR updates ls-theme to reference Yoast's block instead.

Out of scope (confirmed, not touched)

Test plan

  • Confirmed the full render chain resolves: template → parts/breadcrumbs.htmlls-theme/breadcrumbs pattern → yoast-seo/breadcrumbs block
  • Grepped full repo for ls-plugin/breadcrumbs and .ls-crumbs — zero remaining references to the removed custom block or its styling
  • php -l on patterns/breadcrumbs.php — no syntax errors
  • Manually tested on local WP install (Yoast reindexed after settings changes):
    • Top-level page → correct trail
    • Nested/child page → correct trail, including parent link
    • Nested category archive page → correct trail
    • Single post in a nested category → correct trail (categories + ancestors)
    • Portfolio CPT single item → correct flat trail (no taxonomy, matches prior tested behaviour)
  • Portfolio CPT archive, search results page, 404 page, and homepage (expected no breadcrumb) — lower-risk, Yoast-native paths, not yet manually re-verified after this change

Closes LS-1228 (Part 2).

Summary by CodeRabbit

  • New Features

    • Added Yoast SEO breadcrumbs to pages, posts, and archive views.
    • Breadcrumbs appear below the site header with consistent spacing and alignment.
    • Breadcrumbs gracefully remain hidden when Yoast SEO is inactive.
  • Documentation

    • Updated the unreleased changelog to document breadcrumb integration and fallback behavior.

- Wire ls-plugin/breadcrumbs block into patterns/breadcrumbs.php
- Add breadcrumbs template part to page, single, and archive templates
- Add Requires Plugins: ls-plugin header to style.css
- Update CHANGELOG.md
- Replace ls-plugin/breadcrumbs block reference with yoast-seo/breadcrumbs
  in patterns/breadcrumbs.php
- Change Requires Plugins theme header from ls-plugin to wordpress-seo
- Update CHANGELOG.md to describe the Yoast block adoption instead of
  the removed custom block

LS-1228 Part 2 re-approach: drops the custom block in favor of Yoast
SEO's own breadcrumbs block, per course-correction plan.
@brandonmarshal brandonmarshal added area:seo Technical SEO (meta/schema/sitemaps) area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration comp:block-templates Template files/editor release:patch Backwards‑compatible bug fixes requiring a PATCH version bump (e.g., small fixes, docs updates). status:needs-review Awaiting code review labels Jul 15, 2026
@linear-code

linear-code Bot commented Jul 15, 2026

Copy link
Copy Markdown

LS-1228

@brandonmarshal brandonmarshal self-assigned this Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

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
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 269c5a82-6d2e-4ebd-af97-bc2c78fee782

📥 Commits

Reviewing files that changed from the base of the PR and between 62c4217 and f1426c4.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • patterns/breadcrumbs.php

📝 Walkthrough

Walkthrough

The theme adds conditional Yoast SEO breadcrumb rendering through the Breadcrumbs pattern and includes that template part in the page, single, and archive templates. The changelog documents the integration and inactive-plugin behavior.

Changes

Breadcrumbs integration

Layer / File(s) Summary
Define Yoast breadcrumb pattern
patterns/breadcrumbs.php
The pattern conditionally renders the wp:yoast-seo/breadcrumbs block inside a full-width padded group.
Wire breadcrumbs into templates
templates/page.html, templates/single.html, templates/archive.html, CHANGELOG.md
The three templates include the breadcrumbs template part after their headers, and the changelog records the integration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PageSingleArchiveTemplate
  participant BreadcrumbsTemplatePart
  participant YoastSEO
  PageSingleArchiveTemplate->>BreadcrumbsTemplatePart: Include breadcrumbs template part
  BreadcrumbsTemplatePart->>YoastSEO: Check yoast_breadcrumb
  YoastSEO-->>BreadcrumbsTemplatePart: Render breadcrumbs block when available
Loading

Suggested reviewers: zaredrogers

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: switching the breadcrumbs pattern to Yoast SEO's native block.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/LS-1228-breadcrumbs-part-2

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.

@mergify

mergify Bot commented Jul 15, 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 integrates Yoast SEO's native breadcrumbs block into the Breadcrumbs pattern and includes it as a template part in the page, single, and archive templates. It also declares the plugin dependency in style.css and updates the changelog. The feedback suggests conditionally rendering the breadcrumbs block wrapper in patterns/breadcrumbs.php only when Yoast SEO is active to avoid rendering an empty div with unwanted padding when the plugin is disabled.

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/breadcrumbs.php Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
patterns/breadcrumbs.php (1)

2-8: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add the required @package tag.

PHPCS fails this file because its file comment is missing @package. Add the theme package identifier, for example:

Proposed fix
 /**
  * Title: Breadcrumbs
  * Slug: ls-theme/breadcrumbs
  * Categories: breadcrumbs
  * Block Types: core/template-part/breadcrumbs
  * Description: A breadcrumb navigation section for the website.
+ * `@package` ls-theme
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/breadcrumbs.php` around lines 2 - 8, Add the required `@package` tag
to the file-level docblock above the Breadcrumbs pattern metadata, using the
theme’s established package identifier and preserving the existing Title, Slug,
Categories, Block Types, and Description entries.

Source: Pipeline failures

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@style.css`:
- Line 11: Remove the unsupported Requires Plugins header from style.css and
update the corresponding CHANGELOG.md entry to reflect the actual theme
behavior; do not add an admin notice unless enforcing the Yoast SEO dependency
is required.

---

Outside diff comments:
In `@patterns/breadcrumbs.php`:
- Around line 2-8: Add the required `@package` tag to the file-level docblock
above the Breadcrumbs pattern metadata, using the theme’s established package
identifier and preserving the existing Title, Slug, Categories, Block Types, and
Description entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 78d01d7b-5a4a-4bed-8738-3db71e42fbdb

📥 Commits

Reviewing files that changed from the base of the PR and between 1353d7b and 62c4217.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • patterns/breadcrumbs.php
  • style.css
  • templates/archive.html
  • templates/page.html
  • templates/single.html

Comment thread style.css Outdated

@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

- style.css: remove `Requires Plugins: wordpress-seo`. WordPress's
  Plugin Dependencies feature (6.5+) only reads this header from
  plugins, never from a theme's style.css, so the line was inert
  metadata that never notified anyone of anything.
- CHANGELOG.md: correct the entry to stop claiming a notification
  behavior that never existed; note the pattern degrades gracefully
  when Yoast SEO is inactive instead.
@brandonmarshal
brandonmarshal merged commit 2cee433 into develop Jul 15, 2026
4 of 7 checks passed
@brandonmarshal
brandonmarshal deleted the feature/LS-1228-breadcrumbs-part-2 branch July 15, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:seo Technical SEO (meta/schema/sitemaps) area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration comp:block-templates Template files/editor release:patch Backwards‑compatible bug fixes requiring a PATCH version bump (e.g., small fixes, docs updates). status:needs-review Awaiting code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants