Nicer UX with custom template part areas #120
Replies: 3 comments 1 reply
-
I don't know if this code even makes sense in the current version of WordPress. Each new file in the For renaming, you can use
|
Beta Was this translation helpful? Give feedback.
-
Conversation locked. Please continue discussion on the issue: |
Beta Was this translation helpful? Give feedback.
-
Post published here: https://developer.wordpress.org/news/2023/06/upgrading-the-site-editing-experience-with-custom-template-part-areas/ |
Beta Was this translation helpful? Give feedback.
-
By default, there are 3 template part areas that themes can use:
In early development, there was once also a Sidebar area, but it was removed. Theme authors can register any custom areas they want via the
default_wp_template_part_areas
filter hook. This has been around for a while but is undocumented (AFAIK). This would be a super simple tutorial to write (would make for a "good first topic" for a new Dev Blog writer):PoC of registering a sidebar area:
This makes navigating the template editor UI much nicer. For example, in this screenshot, the area is labeled "Sidebar" instead of "General":
Beta Was this translation helpful? Give feedback.
All reactions