Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #276175

    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

    #276221

    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

    #276418

    Thanks Ismael,

    Will give it a go!

    Andrew

    #276425

    Hey!

    Great, I’ll leave this thread open in case it doesn’t work.

    Cheers!
    Peter

    #276441

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Post Slider’ is closed to new replies.