Added sorting for post index page