I’ve created a portfolio page that pulls in galleries created in portfolio pages. I want them to show up with the most recently created portfolio/gallery to be in the first position. I’ve checked other support questions and found this code (below) and pasted it at the end of the functions.php file, but didn’t work. I also changed ASC to DESC. Here’s the page it’s on where India photos should be first: http://withthisring.org/check-us-out/gallery/
Please advise:
function loop_portfolio_query( $location )
{
if ( $location == ‘loop-portfolio’ )
{
global $avia_config;
if(isset($avia_config)) {
$avia_config = “date”;
$avia_config = “DESC”;
query_posts($avia_config);
}
}
}
add_action( ‘avia_action_query_check’ , ‘loop_portfolio_query’, 10, 1 );
Thanks for your help!