Hi,
I was wondering if there’s a way to sort by category by default. I’ve read on the forums the possibility of ascending, descending, or choosing a specific category to sort upon pageload but it’s not what I’m looking for. In the link I’ve attached, for example you can see that not all the Woodgrains are placed beside each other. It would be ideal if in the sort by All, it grouped them together by category (Decorative Inserts/High Gloss/Matte/Super Matte/Woodgrain).
Thanks!
Hey schenkco!
We don’t have any options for that currently and it would take quite a bit of time and code to create a feature like that so it would have to be considered custom work. It would be best to hire a freelancer to help you out with this customization.
Regards,
Elliott
Thanks for your response. Is there any way to sort other than alphabetical? i.e. tags?
Hi!
have a look at this: http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/
Cheers!
Andy
Awesome, thanks!
function custom_post_grid_query( $query, $params ) {
$query['orderby'] = 'name';
$query['order'] = 'ASC';
return $query;
}
add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2);
This worked for me. I just had to change the post slug name to sort my categories :)