Hello, I need help: How can I change the sorting of portfolio items?
I need a random order.
Open up functions.php and add following code to the bottom of the file:
function loop_portfolio_query( $location )
if ( $location == 'loop-portfolio' )
$avia_config['new_query']['orderby'] = "rand";
add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );
Hi Dude, thanks for the function.
I pasted it in the file but every time I load the page (start page with some images from portfolio, or the portfolio page) I get the same pics in the same order.
The snippet above should work. Try to remove browser histroy then refresh the page. You will notice that the portfolio entries will change order every page load.
Hello, I deactivated the “post types order”-plugin and now it works.
Supadupa! Thanks for your help.
The topic ‘Flagship Portfolio in random order’ is closed to new replies.