#3358 closed defect (bug) (worksforme)
Changing Sort Options in Admin Doesn't Work
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.0.5 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I changed:
wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1');
to
wp('post_type=page&orderby=post_title&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1');
because my fiance wanted her pages sorted as such, by post title. However, they don't sort by post title after I do this. The sorting mechanism just breaks altogether. I tried this with the SQL statement from 2.0.5, and that also didn't work when I changed it to sort by post title.
Change History (4)
comment:1
follow-up:
↓ 2
bryanveloso
— 7 years ago
comment:2
in reply to:
↑ 1
westi
— 7 years ago
Looking at query.php (in trunk) you don't want to use post_title but just title here:
The 'allowed' values are:
$allowed_keys = array('author', 'date', 'category', 'title', 'modified', 'menu_order');
The relavent code is here
if ( 'menu_order' != $orderby )
$orderby = 'post_' . $orderby;
comment:3
bryanveloso
— 7 years ago
- Resolution set to worksforme
- Status changed from new to closed
Thanks westi. :)
Note: See
TracTickets for help on using
tickets.
Oh, this line is #22 in edit-pages.php.