Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #527230

    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!

    #527921

    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

    #528635

    Thanks for your response. Is there any way to sort other than alphabetical? i.e. tags?

    #529405
    #529474

    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 :)

    • This reply was modified 8 years, 11 months ago by schenkco.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Portfolio Grid Default Sort by Category’ is closed to new replies.