| 1 |
<?php |
| 2 |
/** |
| 3 |
* Pagination - Show numbered pagination for search results pages. |
| 4 |
* |
| 5 |
* @author PropertyHive |
| 6 |
* @package PropertyHive/Templates |
| 7 |
* @version 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 11 |
|
| 12 |
?> |
| 13 |
<div class="propertyhive-pagination"> |
| 14 |
<?php |
| 15 |
if ( $max_num_pages > 1 ) |
| 16 |
{ |
| 17 |
echo paginate_links( apply_filters( 'propertyhive_pagination_args', array( |
| 18 |
'base' => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ), |
| 19 |
'format' => '', |
| 20 |
'current' => max( 1, get_query_var( 'paged' ) ), |
| 21 |
'total' => $max_num_pages, |
| 22 |
'prev_text' => '←', |
| 23 |
'next_text' => '→', |
| 24 |
'type' => 'list', |
| 25 |
'end_size' => 3, |
| 26 |
'mid_size' => 3 |
| 27 |
) ) ); |
| 28 |
} |
| 29 |
else |
| 30 |
{ |
| 31 |
echo ' '; |
| 32 |
} |
| 33 |
?> |
| 34 |
</div> |