Hi!
I am asking myself if there is a way to change the order of the portfolio entries.
Thanks for your help.
Nic
Hi!
You can use this on functions.php:
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);
Refer to this link for more order parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Regards,
Ismael
Hey!
No, it doesn’t affect the sort by category function. It works on my end. Can you please give us a link to the page? Please add it on wp-content/themes/enfold/ functions.php file.
Regards,
Ismael
Hi!
I don’t see any portfolio entries on the link you posted above. If you want to change the portfolio order by id, you can use this:
function custom_post_grid_query( $query, $params ) {
$query['orderby'] = 'ID';
$query['order'] = 'ASC';
return $query;
}
add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2);
Change the order parameter to either ASC (ascending) or DESC (descending). Remove browser cache then reload the page a few times.
Best regards,
Ismael
Hi, a nice free plugin that does the trick with drag n drop is the “simple page ordering” plugin.
Hi!
I think this plugin http://wordpress.org/plugins/post-types-order/ will help you.
Regards,
Peter