New WordPress Feature Proposal Adds Content Authorship to Menus in the Customizer

Yesterday, Nick Halsey, one of the maintainers of the WordPress Customize component, published a proposal to add content authorship to menus in the customizer. This feature is specifically targeted at new users who might wish to set up a menu that includes pages which have not yet been created.

The scenario is familiar to those who have set up a good number of WordPress sites: You visit the pages menu in the admin to create a bunch of empty pages that you want to be displayed in the menu, and then you add them all to a new menu. This fills out the design and then you can go back and create the content later.

With users given the option to customize after activating a theme, they’re more likely to try creating a menu before any of the pages have been published. This feature proposal makes it possible to create new pages in the customizer while adding them to a menu, as shown in the demo Halsey published:

content-authorship-nav-menus

Halsey emphasized that the feature will not replace the ability to create pages in the admin via the post editor. Content authorship in menus is squarely aimed at new users and those who are restructuring a site.

“To allow new content to be created in the customizer, posts are created with the auto_draft status,” Halsey explained. “When the user saves and publishes in the customizer, these newly-created posts are transitioned to be published. In the customizer preview, the status is modified to protected to allow the posts to be previewed.”

Term creation is not yet part of the UI but Halsey said this is a consideration for the future. The new feature will also include a filter for disabling content authorship on a per-post-type basis.

Halsey also clarified the relationship between content authorship for menus and the Customize Posts project:

Part of the inspiration for this feature comes from the Customize Posts plugin, which has the ability to live-preview posts and post meta in the customizer. Only a very small portion of the plugin would make its way into core as part of the nav menus content authorship feature. However, the proposal is currently to establish the wp.customize.Posts namespace for future expansions of post-related functionality in the customizer. The existing plugin would extend this core namespace, and other plugins could do so as well.

At this time the team has no plans to push Customize Posts forward for merge into core, but Halsey said an upcoming feature project will “explore the future of live preview in WordPress at a broader level.”

For the most part, feedback on the proposal has been positive and enthusiastic. The bulk of the work for adding content authorship to menus has already been completed and the latest patch on the project’s ticket is ready for testing. The Customizer team is targeting WordPress 4.7 to propose the feature for inclusion in core.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

3 Comments


  1. Since we are talking about menus, it would be great if there was a menu batter box a la widgets. Making menu items is tedious and there is no place to put them if the menu is killed for whatever reason. Perhaps even menu items could be created separately of menus and then added to menus when needed.

    Report


    1. Sort of like “inactive menu items”?

      There’s been some discussions through the years about creating a menu items section that holds things like the “Home” page link, and plugins/themes would be able to create their own pre-defined menu items for that space. Another one (before actual support was just added in 4.4) was support for post type archives.

      Report


  2. I’ll repeat my comment from the Make post here:

    While I think this functionality is useful, I think the Customizer is the wrong place for it. That also extends to post/page editing btw. Using the Customizer for content creation blurs the scope of the feature by mixing two very different types of tasks into one tool: Customizing the appearance and functionality of a site vs. creating content for the site.

    I can see this type of feature creating a lot of confusion for the end-user, especially those who are not already well versed in how WordPress works.

    IMO for this concept to work, there has to be a clear separation between the Customizer action (creating and customizing a menu) and the content creation action (creating and populating Pages). This separation needs to be both contextual and visual, either by moving focus off the Customizer to a new and different Editor panel, or by enabling in-page/post editing directly in the preview.

    Report

Comments are closed.