make two custom columns sortables
I have 2 custom columns, typeconsole
and console
:
add_filter('manage_edit-post_sortable_columns', function( $columns ) {
$columns['typeconsole'] = 'typeconsole';
$columns['console'] = 'console';
return $columns;
});
This answer allows me to sort the first column: Make custom column sortable. When pressing the second column, the first one is ordered.
How do I make them work independently?