If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #169235

    Hi there,
    I’m using Flagship and my client has asked that on the front page for the portfolio items to be randomised.

    I found the code as suggested in another thread which worked great – until I added multiple portfolio catergories – at that point it went back to alphabetical sorting.
    Is there a way to fix this?

    Thanks in advance!


    Hi henryscat666!

    Try adding this code to your functions.php file:

    function loop_portfolio_query( $location )
    if ( $location == 'loop-portfolio' )
    global $avia_config;
    if(isset($avia_config['new_query']) && !is_home()) {
    $avia_config['new_query']['orderby'] = "rand";
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );



    If I wasn’t married already, I’d have your babies!
    Thanks very much dude!


    Hehe, glad we could help, let us know if you have any more questions or issues :)


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Portfolio random order – multiple categories’ is closed to new replies.