added categories dropdown
moved selectPost and sortPost to query.js