I’m using paginate_links to paginate the results of a loop.
I want to style the pagination using dots instead of numbers, but I’m not sure how to go about doing this.
I could try to play around with the css but I would prefer a clean method.
example.
<- o o o ->
currently.
<- 1 2 3 ->
This is currently how I am outputting my links.
<?php
$big = 999999999;
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $the_query->max_num_pages,
'prev_text' => __('<div class="prev pull-left"><i class="icon-arrow_thin_left"></i></div>'),
'next_text' => __('<div class="next pull-right"><i class="icon-arrow_thin_right"></i></div>'),
'type' => 'array',
'n_display' => 'test'
) );
foreach ( $paginate_links as $pgl ) {
echo "$pgl";
}
?>
Looking at the core paginate_links() function in WordPress is there anyway I can modify the output of $n_display before or after.
There is no clean way to do this (that I notice from quick look at rather messy code of it), but
$n_display
is passed though formattingnumber_format_i18n()
function which does have a filter.So you could try something like: