Hello the team,
I try to display the 3 last items from a category of my portfolio (It’s easy, thank you).
BUT, i need them displayed in the ASC order.
Is it possible ?
Best regards.
Hey hurraken,
Thank you for using Enfold.
How did you display the items? Did you use the portfolio grid element? If yes, try to use the “avia_post_grid_query” filter to alter the query. Please provide a link to the actual page so that we can inspect it.
Best regards,
Ismael
Hello,
Yes, i use the portfolio grid element and the “avia_post_grid_query” filter.
Here’s the informations in the private area.
Best regards.
Hi,
How did you use the filter? Please post the code here. Try this to add this query in the existing filter:
$query['orderby'] = 'title';
$query['order'] = 'ASC';
Best regards,
Ismael
Hello Ismael,
I add this code to my functions.php (child theme) :
add_filter('avia_post_grid_query', 'avf_custom_post_grid_query');
function avf_custom_post_grid_query ( $query ) {
$query['orderby'] = 'date';
$query['order'] = 'ASC';
return $query;
}
But it’s not what i need. It’s alter the whole query
I need the 3 last events display in ASC order.
But i don’t know if it’s possible.
Regards