-
AuthorPosts
-
January 7, 2014 at 3:24 am #206086
Hi!
I am asking myself if there is a way to change the order of the portfolio entries.
Thanks for your help.
NicJanuary 7, 2014 at 3:28 am #206087This reply has been marked as private.January 7, 2014 at 3:36 am #206089This reply has been marked as private.January 7, 2014 at 3:55 am #206098This reply has been marked as private.January 7, 2014 at 3:57 am #206099Hi!
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,
IsmaelJanuary 7, 2014 at 4:17 am #206111This reply has been marked as private.January 7, 2014 at 5:07 am #206121This reply has been marked as private.January 7, 2014 at 5:55 am #206128Hey!
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,
IsmaelJanuary 7, 2014 at 8:33 am #206191This reply has been marked as private.January 7, 2014 at 8:49 am #206198Hi!
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,
IsmaelJanuary 9, 2014 at 10:52 am #207328Hi, a nice free plugin that does the trick with drag n drop is the “simple page ordering” plugin.
January 9, 2014 at 2:41 pm #207432Hi!
I think this plugin http://wordpress.org/plugins/post-types-order/ will help you.
Regards,
Peter -
AuthorPosts
- The topic ‘Portfolio Entries – change order’ is closed to new replies.
