Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Generated pattern headers use the template slug as title and category names instead of slugs

Open Beginner friendly
#871 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
tooling

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:

https://github.com/WordPress/create-block-theme/blob/5524f195e8/includes/create-theme/theme-patterns.php#L59-L78

 * 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:

https://github.com/WordPress/create-block-theme/blob/5524f195e8/includes/create-theme/theme-patterns.php#L86-L87

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WordPress/create-block-theme

All issues in WordPress/create-block-theme

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.