Support

Home Forums Event Espresso Premium Sorting by custom column in Event's registration table Reply To: Sorting by custom column in Event's registration table

Reply To: Sorting by custom column in Event's registration table

Author Replies
Tony # Posted on April 12, 2018 at 4:19 am

Hi there,

It turns out there is a filter for this:

$_sortable = apply_filters("FHEE_manage_{$this->screen->id}_sortable_columns", $_sortable, $this->_screen);

To add sorting to a custom column named ‘custom_column’, you would do something like this:

function tw_ee_sortable_columns( $sortable_columns, $screen ) {
	if ( $screen == 'espresso_registrations_default' ) {
		$sortable_columns['custom_column'] = array('custom_column' => TRUE);
	}
	return $sortable_columns;
}
add_filter('FHEE_manage_event-espresso_page_espresso_registrations_sortable_columns', 'tw_ee_sortable_columns', 10, 2);
Do NOT follow this link or you will be banned from the site!