Make WordPress Core

Opened 6 years ago

Last modified 4 years ago

#19833 closed defect (bug)

can not sort by 2 custom fields — at Initial Version

Reported by: zied86 Owned by: zied86@…
Milestone: Priority: normal
Severity: blocker Version: 3.3.1
Component: Query Keywords:
Focuses: Cc:


Hello I followed the syntax of the codex to sort by two criteria of custom fields, but unfortunately it does not work


It accepts only one custom field

$args = array( 'post_type' => 'post_type', 'posts_per_page' => '20', 'orderby' => 'custom_field1 custom_field2', 'order' => 'ASC');

$query = new WP_Query( $args );

thank you

Change History (0)

Note: See TracTickets for help on using tickets.