Add multi-panel feature to pages through add_theme_support
|Reported by:||karmatosed||Owned by:|
Description (last modified by celloexpressions)
Making a multi-panel page and giving users the ability to chose what content is in those sections this is something people really want. There are a lot of methods to do this, from plugins to within themes. As a result, there's a lot of confusion for users.
At Automattic, we've now done this in several themes through a 'Theme Options' section. In this ticket, I am suggesting a way that this comes back to core.
Before I dive into this suggestion, I will say that I think there are absolutely other ways. In the long run I would also love to see content blocks make this feature obselete. But, this option is user tested. This is the best, proven method for users to get this. It also should be a lot less difficult and more time efficient to achieve. I'd love to see this be part of this release.
How would this happen? Lets look at a flow suggestion.
- There is a new section under the Customizer called 'Multi Panel' - we totally should come up with a better name.
- You can click in and see each panel here.
- You then from those panels can click in and add content to the panels.
Stepping through that this in code would appear something like this:
- add_theme_support(multipanel-page, 4);
// 4 being number of panels and unlimited being the default.
For simplicity I am just suggesting it's a simple add_theme_support. We have past precedence for this. Then you'd get the new section in Customizer appear. I also suggest this gets made as a feature plugin porting pretty much all of the existing code. At least this makes sense as a first step.
Template wise, we probably want a consistent naming for this or to have people able to declare a template page. It could then have that page used as a static page, or just be used. You could either use one wrapping content for all or call each panel (if set numbers) and style each differently. This opens up to some flexibility with layout.
This type of multi-panel page can be seen already live in themes like Pique: https://en-gb.wordpress.org/themes/pique/. There's good evidence from user testing that currently this is the best option too.
Change History (194)
8 months ago
- Description modified (diff)
- Type changed from defect (bug) to feature request
8 months ago
8 months ago
- Milestone changed from Awaiting Review to 4.7
- Type changed from feature request to task (blessed)