str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'prev_text' => '«',
'next_text' => '»',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'add_args' => false,
));
} else if (is_home() ) {
$total = $wp_query->max_num_pages ;
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'prev_text' => '«',
'next_text' => '»',
'current' => max( 1, get_query_var('paged') ),
'total' => $total,
'add_args' => false,
));
} else if (is_page() ) {
$args = array('post_type' => 'post', 'paged' => diarjolite_paged(), 'posts_per_page' => get_option('posts_per_page'));
$query = new WP_Query( $args );
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'prev_text' => '«',
'next_text' => '»',
'current' => diarjolite_paged(),
'total' => $query->max_num_pages ,
'add_args' => false,
));
}
if (!empty($paginate_links)) {echo '' . $paginate_links . '
'; }
?>