Title: Plugin Pagination help&#8230;
Last modified: August 20, 2016

---

# Plugin Pagination help…

 *  [davidcunniffe](https://wordpress.org/support/users/davidcunniffe/)
 * (@davidcunniffe)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-pagination-help/)
 * There is pagination on a plugin I’m using and I not getting any response from
   the writer. It’s not a pluign I downloaded from this site.
 * Basically I just want to find out how to display the pagination like this:
    <
   < 1 2 3 4 … 20 >>
 * It would be great if anyone could help. Thanks in advance.
 * Here is the code:
 *     ```
       $pr = get_option('frp_rpp'); // rows per page
       	$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
   
       	// BEGIN PAGINATION HEAD
       	if($competition != '')
       		$pages = implode(mysql_fetch_assoc(mysql_query("SELECT COUNT(*) FROM <code>$tbl_match</code> WHERE DATE_ADD(matchdate, INTERVAL matchtime HOUR_SECOND) <= NOW() AND competitionyear = '$year' AND competition = '$competition' ORDER BY matchdate DESC")));
       	if($competition == '')
       		$pages = implode(mysql_fetch_assoc(mysql_query("SELECT COUNT(*) FROM <code>$tbl_match</code> WHERE DATE_ADD(matchdate, INTERVAL matchtime HOUR_SECOND) <= NOW() AND competitionyear = '$year' ORDER BY matchdate DESC")));
   
       	$pages = ceil($pages/$pr);
   
       	$querystring = '';
       	foreach($_GET as $key => $value) {
       		if($key != "page") $querystring .= "$key=$value&";
       	}
       	// END PAGINATION HEAD
   
       	// BEGIN PAGINATION DISPLAY
       	// TODO: CHECK FOR MORE THAN 1 PAGE
       	if($pages > 1) {
       		$display .= '<p class="pagination"><strong>Results:</strong> ';
       		for($i = 1; $i <= $pages; $i++) {
       			$display .= '<a '.($i == $page ? 'class="selected" ' : '');
       			$display .= "href=\"?{$querystring}page=$i";
       			$display .= '">'.$i.'</a> ';
       		}
       		$display .= '</p>';
       	}
       	// END PAGINATION DISPLAY
       ```
   

The topic ‘Plugin Pagination help…’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [davidcunniffe](https://wordpress.org/support/users/davidcunniffe/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-pagination-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
