Tagged: post slider
Hello,
I have added a post slider to the bottom of a portfolio entry because I would like to use it as a ‘related items’ sort of option. What is the best way to configure it so that it is more random across a range of portfolio pages (more than 100) For example, I don’t want it to display the same 10 entries across the entire set of portfolio pages.
Any ideas?
Thanks
Andrew
Hi awilson3rd!
Thank you for visiting the support forum!
If you want to randomize the post slider query. Add this on functions.php:
add_filter('avia_post_slide_query','avia_random_post_order', 10, 2);
function avia_random_post_order($query, $params)
{
$query['orderby'] = 'rand';
return $query;
}
Cheers!
Ismael
Thanks Ismael,
Will give it a go!
Andrew
Hey!
Great, I’ll leave this thread open in case it doesn’t work.
Cheers!
Peter
Hello Peter,
That seems to work fine, it displays a random set of portfolio entries which change on a per portfolio entry basis.
Thanks for the help.
Andrew