Adding pagination in the top and bottom of search results