This is a function to do it easily:
This might be better: http://scribu.net/wordpress/custom-sortable-columns.html
[php]
/*-----------------------------------------------------------------------------------*/
/* CUSTOM ORDER A CUSTOM POST TYPE IN THE WP ADMIN EDIT.PHP SCREEN */
/*---------------------------------------------------------------------*/
function posts_for_current_author($query) {
if($query->is_admin) {
if ($query->get('post_type') == 'articles')
{
$query->set('orderby', 'date');
$query->set('order', 'DESC');
}
}
return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');
[/php]Revisions
- May 1, 2012 @ 01:56:15 [Current Revision] by PeterLugg
- May 1, 2012 @ 02:01:19 [Autosave] by PeterLugg
- May 1, 2012 @ 01:55:53 by PeterLugg
- May 1, 2012 @ 01:55:03 by PeterLugg
- May 1, 2012 @ 01:52:58 by PeterLugg
Revision Differences
There are no differences between the May 1, 2012 @ 02:01:19 [Autosave] revision and the current revision. (Maybe only post meta information was changed.)
No comments yet.