Generated pattern headers use the template slug as title and category names instead of slugs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in includes/create-theme/theme-patterns.php, especially the pattern-header sections linked in the issue at lines 59–78 and 86–87. Compare the values written for template-based titles and editor-saved categories with the expected title and term slugs, then verify the result against a theme exported with Create Block Theme.
Written by the indexing model from the issue text.
Description
What happens
The pattern headers CBT writes use the wrong values for the title and categories.
Title. Patterns created from templates use the template slug as the title:
* Title: {$template_slug}
So a theme gets patterns titled "archive-product", "order-confirmation", "home-header" and so on. The title becomes the block name in List View and is sent to translators.
Categories. Patterns saved from the editor get the category display names instead of slugs:
wp_list_pluck( $pattern_category_list, 'name' )
So headers read Categories: Text, Categories: About or Categories: Banners. Core matches category slugs, so these patterns don't appear under the core Text, About or Banners categories (the core slug for the last one is banner).
Expected
- Template-based patterns use the template's title (
$template->title), e.g. "Product Catalog". - Categories use the term slugs.
Related
#562 (saving turns templates into patterns).
Drafted with AI assistance, verified by me against a theme exported with Create Block Theme and the source.
- Dominant language
- JavaScript
- Stars
- 418
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/create-block-theme
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
WordPress/create-block-theme#868 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
WordPress/create-block-theme#867 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
WordPress/create-block-theme#866 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WordPress/create-block-theme#856 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
WordPress/create-block-theme#872 ·
All issues in WordPress/create-block-theme
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Design only Leadership Survey SLFS
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bcgov/digital-journeys#2293 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tursodatabase/turso#9405 ·
Maintainers usually reply within 1 day
-
Toolkit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
API Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Maintainers usually reply within 1 day