Ticket #10266 (closed enhancement: fixed)
wp_page_menu sort_column value should be "menu_order, post_title"
| Reported by: |
|
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
Change History
nathanrice — 3 years ago
-
attachment
post-template.diff
added
+1
wp_page_menu() hasn't been around long enough for this to break too many themes.
comment:2
chrishajer — 3 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.
- Status changed from new to closed
- Resolution set to fixed

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