Add search function for posts.