[原创]wordpress中修改文章排序字段的几种方法

关于wordpress排序,默认依post_date排序;wordpress内定允许的排序字段包括:

'post_name', 'post_author', 'post_date', 'post_title', 'post_modified','post_parent', 'post_type', 'name', 'author', 'date', 'title', 'modified','parent', 'type', 'ID', 'menu_order', 'comment_count', 'rand'

如果需要修改文章依ID字段排序,方法大致有:
1、可以向posts_orderby这个hooks添加内容。位于wp-includes/query.php中 3206行。
Continue reading [原创]wordpress中修改文章排序字段的几种方法