Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Reorder the list of events in the admin environment so that they show most
- * recently created first.
- */
- add_filter('posts_orderby', function($sql) {
- if (!is_admin() or get_query_var('post_type') !== TribeEvents::POSTTYPE) return $sql;
- $table = $GLOBALS['wpdb']->posts;
- return " $table.post_date DESC ";
- }, 20);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement