mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-17 13:33:32 +09:00
change secondary order to title if post type is hierarchical
This commit is contained in:
@@ -249,7 +249,9 @@ class Display_Featured_Image_Genesis_Admin {
|
||||
),
|
||||
)
|
||||
);
|
||||
$query->set( 'orderby', 'meta_value_num date' );
|
||||
$post_type = $query->get ( 'post_type' );
|
||||
$secondary_order = is_post_type_hierarchical( $post_type ) ? 'title' : 'date';
|
||||
$query->set( 'orderby', "meta_value_num $secondary_order" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user