Skip to content

Instantly share code, notes, and snippets.

@aburi
aburi / gist:02101531bf828749fbd0
Created October 5, 2014 21:31
Relvanssi - sorting by meta value & hits filter
add_filter('relevanssi_modify_wp_query', 'start_date_filter');
function start_date_filter($query) {
$query->set('orderby', 'departure');
$query->set('order', 'asc');
return $query;
}
// Sort by meta field