Reply To: Portfolio Filter with category parent/children only

#2744
livemesh
Keymaster

Regarding the ordering, my mistake saying the order is preserved based on date and time – I implemented a change for a buyer who wanted to control the order of the items and made the change this change in the file utility-functions.php at line number 450 –

From

    $query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'], 'paged' => $paged);

to

        $query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'],
            'paged' => $paged, 'order' => 'ASC', 'orderby' => 'menu_order');

This will help order the portfolio items by specifying the the order in which the items need to be shown. My assumption was that WP would sort automatically based on date if the order was zero but looks like it does not, at least not in all situations. So, if you want to, you can reverse this change OR better, specify the order in the portfolio edit window like this –

https://www.evernote.com/shard/s350/sh/cbb86d51-1016-4a11-9d79-850f19fe71c1/e123a54d7fdf677523a62a7147a204cb

Have made some changes to your portfolio items towards the order and things are working as expected. Thanks