Mmm, stuck on the PHP bit! Custom pagination
Permalink
Hello all,
I'm using Fundamental theme and would like to apply the pagination class to my custom search page.
My search page pulls in tour data from an external site that is listed (this works fine).
Pagination variables that are allowed when pulling in the tour data are: "per_page" (this is equal to the number of tours returned per page); and "page" (this is the displayed page). For example, if I had 10 tours and the search string was "...?per_page=5&page=1" I would see the first page of two, with five tours listed.
Now I'd like to create some pagination at the bottom of the search page.
BUT, I'm stuck on the php that will allow me to use the Foundation code (below) with the allowed variables (above) to display correct pagination.
Just need someone to point me in the right direction!
Any help most most appreciated:)
Foundation5 pagination code
I'm using Fundamental theme and would like to apply the pagination class to my custom search page.
My search page pulls in tour data from an external site that is listed (this works fine).
Pagination variables that are allowed when pulling in the tour data are: "per_page" (this is equal to the number of tours returned per page); and "page" (this is the displayed page). For example, if I had 10 tours and the search string was "...?per_page=5&page=1" I would see the first page of two, with five tours listed.
Now I'd like to create some pagination at the bottom of the search page.
BUT, I'm stuck on the php that will allow me to use the Foundation code (below) with the allowed variables (above) to display correct pagination.
Just need someone to point me in the right direction!
Any help most most appreciated:)
Foundation5 pagination code
<ul class="pagination"> <li class="arrow unavailable"><a href="">«</a></li> <li class="current"><a href="">1</a></li> <li><a href="">2</a></li> <li><a href="">3</a></li> <li><a href="">4</a></li> <li class="unavailable"><a href="">…</a></li> <li><a href="">12</a></li> <li><a href="">13</a></li> <li class="arrow"><a href="">»</a></li> </ul>