Skip to content

Breadcrumbs: Add setting to show trailing separator#78936

Open
himanshupathak95 wants to merge 6 commits into
WordPress:trunkfrom
himanshupathak95:add/78926-breadcrumbs-trailing-separatorr
Open

Breadcrumbs: Add setting to show trailing separator#78936
himanshupathak95 wants to merge 6 commits into
WordPress:trunkfrom
himanshupathak95:add/78926-breadcrumbs-trailing-separatorr

Conversation

@himanshupathak95
Copy link
Copy Markdown
Contributor

@himanshupathak95 himanshupathak95 commented Jun 4, 2026

What?

Closes #78926

This PR introduces a new block attribute, showTrailingSeparator, for the Breadcrumbs block. When enabled, it applies a has-trailing-separator CSS class to the block wrapper, forcing the CSS ::after separator to render on the :last-child item.

Why?

This resolves an issue where users hiding the "current item" could not append a trailing separator to the end of the remaining breadcrumb trail.

Testing Instructions

  1. Insert a Breadcrumbs block into a post.
  2. Under the block settings, toggle ON the new Show trailing separator option.
  3. Verify that a trailing separator appears at the end of the breadcrumb trail.
  4. Toggle OFF the Show current breadcrumb option.
  5. Verify that the current item disappears, but the trailing separator remains correctly attached to the preceding item.
  6. Publish the post and verify the changes reflect correctly on the frontend.

Screenshots or screencast

Screen.Recording.2026-06-04.at.20.45.36.mov

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Jun 4, 2026
@himanshupathak95 himanshupathak95 force-pushed the add/78926-breadcrumbs-trailing-separatorr branch from 18ac5c3 to e272be2 Compare June 4, 2026 15:12
@himanshupathak95 himanshupathak95 force-pushed the add/78926-breadcrumbs-trailing-separatorr branch from e272be2 to 177c86a Compare June 5, 2026 06:30
@himanshupathak95 himanshupathak95 marked this pull request as ready for review June 5, 2026 06:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: mrwweb <mrwweb@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Breadcrumbs Affects the Breadcrumbs Block labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Breadcrumbs Affects the Breadcrumbs Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for trailing separator on breadcrumbs block

2 participants