Add following code to the bottom of functions.php:
function loop_portfolio_query( $location )
{
if ( $location == 'loop-portfolio' )
{
global $avia_config;
if(isset($avia_config['new_query'])) {
$avia_config['new_query']['orderby'] = "title";
$avia_config['new_query']['order'] = "ASC";
query_posts($avia_config['new_query']);
}
}
}
add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );
You can replace ASC with DESC for a descending order.
If you want to sort a certain portfolio page by using the "random" parameter try following code. Instead of 15 insert your portfolio page id (which should display the items/entries in a random order).
function loop_portfolio_query( $location )
{
if ( $location == 'loop-portfolio' )
{
global $avia_config;
if(isset($avia_config['new_query'])) {
$avia_config['new_query']['orderby'] = "title";
$avia_config['new_query']['order'] = "ASC";
if(is_page('15'))
{
$avia_config['new_query']['orderby'] = "rand";
}
query_posts($avia_config['new_query']);
}
}
}
add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );