Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #180878

    I’ve tried adding the following to my child theme functions.php … but this doesn’t change grid post sorting order. Is this the correct function?

    add_filter('avia_post_grid_query','avia_order_by_random');
    function avia_order_by_random($query)
    {
    $query['orderby'] = 'title';
    $query['order'] = 'ASC';
    return $query;
    }

    Thank you for your help!

    #180956

    Hi ttem!

    No, try following code instead

    
    add_filter('avia_post_slide_query','avia_order_by_random', 10, 2);
    function avia_order_by_random($query, $params)
    {
    $query['orderby'] = 'title';
    $query['order'] = 'ASC';
    return $query;
    }
    

    Regards,
    Peter

    #182346

    Thank you Peter!! This works perfectly!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to sort avia blog post element grid posts alphabetically?’ is closed to new replies.