Search for posts logic added