Ticket #10266 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

wp_page_menu sort_column value should be "menu_order, post_title"

Reported by: nathanrice Owned by:
Priority: normal Milestone: 2.8.1
Component: General Version: 2.8
Severity: normal Keywords: has-patch tested
Cc: ryan

Description

The default argument array for wp_page_menu will ignore the menu_order sorting method, in favor of sorting by post_title. This seems backwards to me, since many theme authors don't know that a default wp_page_menu call will ignore menu_order by default, rendering the ordering field useless to the user.

I propose making the default value for sort_column => 'menu_order, post_title" for the sake of users.

I've attached a diff with the change made.

Attachments

post-template.diff Download (648 bytes) - added by nathanrice 3 years ago.
post-template.php diff file to add menu_order as the default sorting method for wp_page_menu

Change History

post-template.php diff file to add menu_order as the default sorting method for wp_page_menu

+1

wp_page_menu() hasn't been around long enough for this to break too many themes.

Just got bitten by this one. No matter what I did, the menu_order was ignored. Cheers to Nathan for submitting the diff. Please accept this change.

comment:3   ryan3 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [11642]) Sort wp_page_menu() by menu_order. Props nathanrice. fixes #10266

comment:4   ryan3 years ago

(In [11643]) Sort wp_page_menu() by menu_order. Props nathanrice. fixes #10266 for 2.8.1

Note: See TracTickets for help on using tickets.