Added while loop in post search