I am struggling to find out why this code doesn’t seem to work anymore:
add_filter('avia_post_slide_query','avia_order_by_random', 10, 2);
function avia_order_by_random($query, $params)
{
if(is_home() || is_front_page()) $query['orderby'] = 'rand';
return $query;
}
I grabbed it from this thread http://goo.gl/lJltMP
I realize it sounds unlikely, but I a few days ago it worked, and now it doesn’t. Is it possible the WP 4.1.2 upgrade affected something? I’ve deleted and reinstalled Enfold, and deactivated all plugins except the plugin that creates the CPTs (without which there would be no content to show) and still the order does not randomize…
Hi Rogier!
Please refer to this post – http://kriesi.at/documentation/enfold/how-to-add-an-orderorderby-option-to-the-blogpost-sliderportfoliomasonry-grid-element/
Best regards,
Yigit