Here is custom script to create custom pagination for word press.

function custom_pagination() {

global $wp_query;

$big = 999999999; // need an unlikely integer

$pages = paginate_links( array(

‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ),

‘format’ => ‘?paged=%#%’,

‘current’ => max( 1, get_query_var(‘paged’) ),

‘total’ => $wp_query->max_num_pages,

‘prev_next’ => false,

‘type’  => ‘array’,

‘prev_next’   => TRUE,

‘prev_text’    => __(‘<i class=”arrow-icon-left-open-mini”></i>’),

‘next_text’    => __(‘<i class=”arrow-icon-right-open-mini”></i>’),

) );

if( is_array( $pages ) ) {

$paged = ( get_query_var(‘paged’) == 0 ) ? 1 : get_query_var(‘paged’);

echo ‘<ul class=”pagination”>’;

foreach ( $pages as $page ) {

if(strripos($page, “current”)){

echo ‘<li class=”active”>’.$page.'</li>’;

}

else{

echo ‘<li>’.$page.'</li>’;

}

}

echo ‘</ul>’;

}

}

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.