I’ve tried adding the following to my child theme functions.php … but this doesn’t change grid post sorting order. Is this the correct function?
add_filter('avia_post_grid_query','avia_order_by_random');
function avia_order_by_random($query)
{
$query['orderby'] = 'title';
$query['order'] = 'ASC';
return $query;
}
Thank you for your help!
Hi ttem!
No, try following code instead
add_filter('avia_post_slide_query','avia_order_by_random', 10, 2);
function avia_order_by_random($query, $params)
{
$query['orderby'] = 'title';
$query['order'] = 'ASC';
return $query;
}
Regards,
Peter
Thank you Peter!! This works perfectly!