Correctly order posts in admin and frontend

issue #1303
Merge pull request #1742 from haswalt/master