Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26783

    Hello,

    When I choose the blog posts element with the grid layout, the firsts posts that it show me are the oldest one, and I would like to show the newest ones.

    I didn’t see any option to choose the order, and I was looking into the code, but I couldn’t find where to change it.

    Thank you

    #131596

    Hey!

    Please add following code to the bottom of functions.php

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

    Best regards,

    Peter

    #131597

    Thank you ;)

    #131598

    Hey,

    Glad it worked. You can also use this plugin:

    http://wordpress.org/plugins/post-types-order/

    Regards,

    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Blog Posts and Grid Layout’ is closed to new replies.