Feature : Permalinks ordered by Date for Breadcrumbs#76571
Feature : Permalinks ordered by Date for Breadcrumbs#76571Vrishabhsk wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Adds date-based permalinks support to the Breadcrumbs block. Now you can show breadcrumb trails like
Home > 2026 > March > 12 > My Post Titleto match date-based permalink structures.Why?
If you use date-based permalinks on your site (like
/2026/03/12/my-post/), your breadcrumbs should reflect that structure. Before this PR, the Breadcrumbs block only gave you two options:But a lot of sites use date-based permalinks, and there was no way to show
Home > Year > Month > Day > Post Titlein the breadcrumb trail. This PR adds that option.How?
What changed
Block attribute
Added a new
breadcrumbStyledropdown with two options:The old
prefersTaxonomycheckbox has been replaced with this dropdown. Existing blocks get migrated automatically.PHP changes
Added a new
block_core_breadcrumbs_get_date_breadcrumbs()function that builds the date trail from the post's publish date:Editor changes
Replaced the "Prefer taxonomy terms" checkbox with a cleaner "Breadcrumb style" dropdown. Also fixed a bug where switching styles would briefly show stale content.
Testing Instructions
npm run wp-env startsingle.html)Preview