Added argument for searching by type (post/thread)