add sorttype to let user set the posts sort type