Tagged: enfold, function.php, Portfolio
Hello.
We have a web page, https://lieropplevelser.akari.digital/lierkulturscene/program, where we want to set up the portfolio to be sorted by date. So when you enter the page, the next event will be the one that is also further down. This should apply only to the portfolios set with a specific category.
Have already added various add_filter in the function.php file.
Sincerely, Mario!
Hey tekniskakari,
Thank you for using Enfold.
The “orderby” parameter is duplicated.
$avia_config[‘new_query’][‘orderby’] = “date”;
$avia_config[‘new_query’][‘orderby’] = “ASC”;
The second parameter should be called “order” and the value set to “ASC” or “DESC”.
Best regards,
Ismael
So the set up should look like this?
{
if($location == ‘loop-portfolio’)
{
global $avia_config;
if(isset($avia_config[‘new_query’]))
{
$avia_config[‘new_query’][‘orderby’] = “date”;
$avia_config[‘new_query’][‘orderby’] = “ASC”;
$avia_config[‘new_query’][‘order’] = “ASC”;
$avia_config[‘new_query’][‘order’] = “date”;
query_posts($avia_config[‘new_query’]);
}
}
}