xnau, please help.
Here is my code, but for some reason it still shows all the fields instead of only first_name & calendar_month
<?php if ( $filter_mode == 'sort' || $filter_mode == 'both' ) : ?>
<fieldset class="widefat">
<legend><?php _e('Sort by', 'participants-database' )?>:</legend>
<?php
/*
* this function sets the fields in the sorting dropdown. It has two options:
* 1. columns: an array of field names to show in the sorting dropdown. If
* 'false' shows default list of sortable fields as defined
* 2. sorting: you can choose to sort the list by 'column' (the order they
* appear in the table), 'alpha' (alphabetical order), or 'order' which
* uses the defined group/field order
*/
$this->set_sortables(true, 'first_name, calendar_month');
?>
<?php $this->sort_form() ?>