WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10266 closed enhancement (fixed)

wp_page_menu sort_column value should be "menu_order, post_title"

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

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 (1)

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

Download all attachments as: .zip

Change History (5)

@nathanrice
10 years ago

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

#1 @filosofo
10 years ago

+1

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

#2 @chrishajer
10 years ago

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.

#3 @ryan
10 years ago

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

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

#4 @ryan
10 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.