[wp-trac] [WordPress Trac] #37974: Add multi-panel feature to pages through add_theme_support

WordPress Trac noreply at wordpress.org
Thu Oct 13 18:21:03 UTC 2016


#37974: Add multi-panel feature to pages through add_theme_support
-----------------------------------------+------------------
 Reporter:  karmatosed                   |       Owner:
     Type:  task (blessed)               |      Status:  new
 Priority:  normal                       |   Milestone:  4.7
Component:  Themes                       |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-ux-feedback needs-patch  |     Focuses:  ui
-----------------------------------------+------------------

Comment (by bradyvercher):

 Responding to [comment:134 @NateWr]:

 For what it's worth, I do share some of your concerns, but I've been
 curious to see what's possible. The query changes in particular were
 revelatory for me about how something like this could work. I don't think
 themes are ready for that kind of change though, which is why I think it
 should continue to require `add_theme_support()`.

 Aside from the concerns posted in this ticket about the redirects, I've
 had a number of people privately question that approach. I had my own
 qualms with it, but I wanted to see where this goes. I don't think it's
 forward compatible if someone wants to feature a post, CPT, or even
 archive as a section...

 Before I get ahead of myself, I think the original intent of this feature
 was to create a "One Page" theme, and in that context the redirects make
 sense. Maybe we need to consider a change in terminology here to indicate
 the narrow scope?

 Child pages do easily solve the relationship problem, but I think that's
 about it. It's definitely something I've done a handful of times for
 isolated projects, but I'm not sure it's a good solution for core and
 would also require working through its own UX issues.

 > On a separate note, some thinking still needs to happen about how this
 feature is encountered on a fresh install. Each mockup and demo so far has
 assumed that there already exist multiple pages in the system. But an
 initial install only adds the Sample Page. Once this is set to the Front
 Page, there are no more pages which can be located and added. This means
 that many people's first encounter with this feature will be to click the
 Add Sections button, open the search panel and be presented with 0
 results.

 Technically, I think they should still see the "Sample Page" in the list
 of results, but this does need a bit more thought, although I don't think
 it poses a significant challenge (famous last words).

 > I'd like to suggest that for 4.7 this feature be bundled with
 TwentySeventeen rather than rolled into core with the goal being to
 refactor this into a more generic Post Collection customizer control that
 can go into 4.8.

 This actually already is a generic Post Collection control that's
 generalized enough to be used for other purposes. The Front Page Sections
 control is just a registered instance of the Post Collection control.

 With that in mind, if we go back to requiring `add_theme_support()`, a
 theme could register its own control to handle the scenario where sections
 should be overviews and allow internal linking (the permalink filtering
 and redirects wouldn't be enabled).

 Themes could also create a control for featured content or displaying the
 three-column blurbs with an icon that seem to be so popular. There's a lot
 that can be done with the control on its own.

 > ...the remaining bits (add_theme_options, URL redirection, etc) can be
 added to core as a small layer on top of the more generalized
 functionality.

 That pretty much describes how this already works.

 Replying to [comment:135 @karmatosed]:

 > One thing that did feel weird though @pento and @bradyvercher, was on
 loading up it showed 'Front Page Sections' without me setting a front
 page.

 I can take care of that in the next patch. It's a one line change.

 > I also found what potentially is a bug - or maybe unusual behaviour. As
 I switched pages, each one was added as a section. This feels like maybe a
 little excessive.

 The front page needs to exist as a section to be able to sort it.
 Otherwise, it'll be prepended to the output, but won't exist in the list
 of sections unless the user adds it after the fact. It would also feel
 weird to not allow the front page to be deleted from the list, but
 switching the front page to one not in the list effectively deletes it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37974#comment:137>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list