Repository navigation
Fix: Tag Cloud: Keep the taxonomy and the post counts setting when transforming to or from Terms List - #86962
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change intended to preserve settings between Tag Cloud and Terms List transforms.
No open issues 🎉
What changed in this PR
Preserves taxonomy and post-count settings when transforming between Tag Cloud and Terms List, fixing the settings loss described in #86960.
Changes:
- Passes the taxonomy through both transforms and maps
showPostCountsto and fromshowTagCounts. - Adds a changelog entry for the fix.
| File | Description |
|---|---|
| packages/block-library/src/tag-cloud/transforms.js | Preserves taxonomy and count settings in both transform directions. |
| packages/block-library/CHANGELOG.md | Documents the transform fix. |
Review effort: Balanced
Mamaduka
left a comment
There was a problem hiding this comment.
Good catch and clean fix. Thanks, @hbhalodia!
What?
Closes #86960
Keeps the selected taxonomy and the post counts setting when a block is transformed between Tag Cloud and Terms List, in both directions.
Why?
Both transforms created the new block with default attributes. A Categories List transformed to Tag Cloud showed tags, a Tag Cloud transformed to Terms List showed categories, and the counts option was turned off either way. The transforms were added in #38566, before #65272 gave the Terms List block a
taxonomyattribute, and were never updated.How?
Each transform now passes the source block's settings to
createBlock():taxonomyis passed as is, since both blocks store it as a taxonomy slug.showPostCounts(Terms List) andshowTagCounts(Tag Cloud) are mapped to each other.Settings with no counterpart in the other block (number of tags, font sizes, dropdown, hierarchy, empty terms) keep their defaults. Colors, class names and other block supports were already carried over by the block editor.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2026-11-17.at.6.45.39.PM.mov
Use of AI Tools
Claude Code (Claude Opus 5.5) was used to trace the cause and draft the fix and this description. I reproduced the bug and reviewed all changes.
🤖 Generated with Claude Code