Added search function for posts