Site Search pagination not working

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 13, 2014   (RSS)

By claire - June 17, 2014

Hey there

Can you email me the code for that page? It's claire@interactivetools.com. I'll see if I can spot the issue.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By sublmnl - June 18, 2014

Sure, sending it now.

Thanks

By sublmnl - July 13, 2014

Just so everyone has it, the pagination code that works is here:

The part that needed editing from those examples is in the a href (link code).

<?php if (@!$_GET['page']): $current_page = "1"; else: $current_page = $_GET['page']; endif;  ?> 
<?php foreach (range(1,$searchDetails['totalPages']) as $page): ?>  
<?php if ($page == $current_page): ?>    
<strong><?php echo $page; ?></strong>
<?php else: ?>    
<a href="search.php?q=<?php echo $_REQUEST['q']; ?>&page=<?php echo $page; ?>"><?php echo $page; ?></a>
<?php endif ?>
<?php endforeach; ?>