I would like to add sorting but don't have any idea how ot go about it. I would like to be able to sort by:
Date, Title, Price (custom field), Comments, Views, ASC + DESC
What would be the best way to do something like this?
Extending this answer for custom post type support.
For a custom post type you can pass an extra parameter ( post_type ) to url, example -
www.example.com/?post_type=FOO&orderby=title&order=dsc
Note - If you've specified some url rewrite for that post type then the above url will become something like this but still showing all posts of post type FOO with descending order by title.
www.example.com/FOO/?&orderby=title&order=dsc
<a href="http://site.com/?post_type=portfolio&orderby=title&order=dsc">test</a>
post_type, See my answer below