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

    I have a portfolio showing on a page and the order seems to be by date added and not by the date of the portfolio (the editable one).

    Is there a way to make the portfolio items sortable by the date of the item and not to simply have them in sequence from when they are added? If I need to add a new item that comes before one that is already there I can t do that.

    Thanks in advance

    EDIT: Is there a way to do this without having to use a plug in like :http://wordpress.org/plugins/post-types-order/

    • This topic was modified 10 years, 10 months ago by Monsoon.
    #208871

    Hi Monsoon!

    Please try to insert following code at the bottom of function.php. You can use DESC if you need a descending order

    
    function custom_post_grid_query( $query, $params ) {
    $query['orderby'] = 'date';
    $query['order'] = 'ASC';
    return $query;
    }
    add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2);
    

    Regards,
    Peter

    #211858

    That s what I call awesome support.
    Thanks Peter worked like a charm and one less plugin to have running

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Enfold – Portfolio items order, doesn t seem sortable by date added’ is closed to new replies.