[wp-trac] [WordPress Trac] #41809: Default setting for menu locations should be to use page structure (no custom menu) with option for no menu

WordPress Trac noreply at wordpress.org
Wed Oct 11 04:12:45 UTC 2017


#41809: Default setting for menu locations should be to use page structure (no
custom menu) with option for no menu
-------------------------------+------------------------------
 Reporter:  anmari             |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Menus              |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by anmari):

 Agree that it was a design decision of themes 2017, 2016, 2015 to offer a
 'no menu' option if there was no custom menu. Doing that by using an empty
 fallback_cb argument means they lost the default of the 'menu from page
 structure' option. Did they realise the impact for those who wanted simple
 menus, possibly not? [[BR]]

 But this makes it '''much''' harder for those that do just want the
 default page based menu.  Folks new to wordpress must surely be gobsmacked
 when trying out themes like twenty-seventeen and finding that they have to
 keep recreating their page structure in the menu system.  So yes while the
 theme's could possibly find a way to make this a setting, because of it's
 impact, I think this should definitely be a setting that wordpress core
 should facilitate.  Possibly an option somewhere sensible. Maybe in the
 customiser at high level? or in the menu section?  [[BR]]
 Options: [[BR]]
 1) default: use wp page structure for the 'main' menu, [[BR]]
 2) use custom menus
 3) no menu for main location.

 I managed code to force the default page menu back. I had a look to have
 this controlled by a setting in the customizer but I'm not that familiar
 with customizer, so did not find somewhere easily to add the above 3 way
 option. [[BR]]

 It seems very wrong that one should have to add back simplicity that used
 to be there.

 ----
 For others who may end up here:

 Code to force default wp page menu back to avoid having to recreate page
 structure in custom menu for themes following twenty-seventeen, twenty-
 sixteen, twenty-fifteen styles:

 {{{#!php
 <?php
 function amr_wp_page_menu_load ($args ){
         if (empty($args['fallback_cb']))
                 $args['fallback_cb'] = 'wp_page_menu');
         return $args;
 }

 function amr_wp_page_menu_init() {
         add_filter('wp_nav_menu_args',          'amr_wp_page_menu_load',
 1);
 }

 add_action ('plugins_loaded', 'amr_wp_page_menu_init',1);
 }}}

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


More information about the wp-trac mailing list