[wp-trac] [WordPress Trac] #35272: .menu-item-home class not applying to static front pages

WordPress Trac noreply at wordpress.org
Thu Dec 31 04:36:16 UTC 2015


#35272: .menu-item-home class not applying to static front pages
--------------------------+-----------------------------
 Reporter:  RachieVee     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The '''wp_nav_menu''' is only applying the '''.menu-item-home''' class to
 menu items when the home url is created with a custom link on Appearance >
 Menus. The Codex and Code Reference mention this class should be added to
 menu items "that correspond to the site front page."

 [https://developer.wordpress.org/reference/functions/wp_nav_menu/]

 When there is a static page set as a front page from Settings > Reading
 Settings, and then added as a link in Appearance > Menus from the "Pages"
 metabox, the class is ''not'' applied to the menu item. So either the
 descriptions in documentation can be adjusted or the conditionals/if
 statements in wp-includes/nav-menu-template.php can be adjusted so this
 class applies to static page links without having to be custom links.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35272>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list