WordPress / WordPress/create-block-theme

'Save changes to theme' re-categorises 'Header' and 'Footer' template parts as 'General'

Open
#690 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Hey folks,
'Header' and 'Footer' Template Parts can be created via the 'Add new pattern' UI in the site editor. Header, Footer and General are the options available. These work as expected, creating the appropriate Template Part.

However, when the 'Save changes to theme' feature on the Create Block Theme wrench menu is used to save the new Template Parts back to the file system, they are re-categorised as regular ('General') Template Parts, not Header or Footer parts.

Before 'save changes to theme':
GStKvhXXMAA7db-

After 'save changes to theme':
GStKaBcX0AAiwl8

WordPress v6.6, Create Block Theme v2.3.0, Blank theme (Created using Create Block Theme) on a clean WP install running on LocalWP.

I assume this is a bug and not intentional behaviour?

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce the issue in the WordPress site editor with the Create Block Theme wrench menu on a clean install, creating Header and Footer template parts before using “Save changes to theme.” Compare the template-part categories before and after saving; done means Header and Footer remain correctly categorized instead of becoming General.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.