Repository navigation
Conversation
…resence and add relevant test case
🤖 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 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
dpmehta
marked this pull request as ready for review
December 1, 2026 14:11
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #87762
Enables the Template control for the homepage in the Site Editor when the theme has no
front-pagetemplate. This covers the page settings sidebar and Quick Edit, in both the site editor and the extensible site editor.Why?
The Site Editor disables the homepage's Template control in every case. That's only needed when a
front-pagetemplate exists, because it always takes precedence. Without one, WordPress uses the template assigned to the homepage, as it does for any page. The post editor already follows this rule inuseAllowSwitchingTemplates(), and the classic Quick Edit in wp-admin -> Pages allows any template for the homepage, so only the Site Editor blocks it, and users can't, for example, apply "Page No Title" to their homepage from the Site Editor.How?
The homepage's Template control is now disabled only when a
front-pagetemplate exists, matchinguseAllowSwitchingTemplates(). The posts page stays disabled as before.The change is in
isTemplateSwitchable()(packages/core-fields/src/post_type_supports/template/is-template-switchable.ts), added in #87541. It drives both the template control and the field'sisDisabled, so the page settings sidebar and Quick Edit in both site editors follow it.An e2e test in
test/e2e/specs/site-editor/pages.spec.jscovers the page settings sidebar and Quick Edit, with and without afront-pagetemplate.Testing Instructions
Screenshots or screencast
before-fix.mov
after-fix.mov
Use of AI Tools
Claude Code was used to trace the cause, write the fix and draft this description. I reviewed the changes and tested them manually as described above.