Hey Mikko – thanks for reply .. I was hoping that would not be the case – so I could use both – to keep the plugin for speed gains plus fit orders by date for my client..
But what do you think, I’ve tried to add simple orderby hook and it looks to me that this works now on quick testing .. do you think that is ok usecase or you think there could be some issues maybe.. thank you, Kres
/*
hook into the Relevassi light plugin and order after 10 priority
*/
add_filter( 'posts_search_orderby', function( $orderby, $query ){
if ( isset( $query->query['s'] ) ) {
$orderby = 'post_date DESC';
}
return $orderby;
}, 11, 2 );