Although WordPress have its own pagination but it is only contains old posts or new posts . But this article will explain how to add a beautiful numbered pagination in your WordPress blogs . You just need to customize WordPress inbuilt functions. Here is the function you need to add in you function.php

if (!function_exists('codingbin_pagination')) {
function codingbin_pagination() {
if( is_singular() )
return;
global $wp_query;
/** Stop execution if there's only 1 page */
if( $wp_query->max_num_pages <= 1 )
return;
$prev_arrow = is_rtl() ? 'next' : 'prev';
$next_arrow = is_rtl() ? 'prev' : 'next';
$total = $wp_query->max_num_pages;
//$total="10";
$big = 999999999; // need an unlikely integer
if ($total > 1) {
if (!$current_page = get_query_var('paged'))
$current_page = 1;
if (get_option('permalink_structure')) {
$format = '/%#%/';
} else {
$format = '&paged=%#%';
}
echo codingbin_paginate_links(array(
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
'format' => $format,
'current' => max(1, get_query_var('paged')),
'total' => $total,
'mid_size' => 3,
'type' => 'list',
'prev_text' => $prev_arrow,
'next_text' => $next_arrow,
));
}
}
}
function codingbin_paginate_links($args = '') {
$defaults = array(
'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
'total' => 1,
'current' => 0,
'show_all' => false,
'prev_next' => true,
'prev_text' => __('&laquo; Previous'),
'next_text' => __('Next &raquo;'),
'end_size' => 1,
'mid_size' => 2,
'type' => 'plain',
'add_args' => false, // array of query args to add
'add_fragment' => '',
'before_page_number' => '',
'after_page_number' => ''
);
$args = wp_parse_args($args, $defaults);
extract($args, EXTR_SKIP);
// Who knows what else people pass in $args
$total = (int) $total;
if ($total < 2)
return;
$current = (int) $current;
$end_size = 0 < (int) $end_size ? (int) $end_size : 1; // Out of bounds? Make it the default.
$mid_size = 0 <= (int) $mid_size ? (int) $mid_size : 2;
$add_args = is_array($add_args) ? $add_args : false;
$r = '';
$page_links = array();
$n = 0;
$dots = false;
$prev_link = '<p class="prev-div" ><span class="prev-click">prev</span></p>';
if ($prev_next && $current && 1 < $current):
$link = str_replace('%_%', 2 == $current ? '' : $format, $base);
$link = str_replace('%#%', $current - 1, $link);
if ($add_args)
$link = add_query_arg($add_args, $link);
$link.= $add_fragment;
/**
* Filter the paginated links for the given archive pages.
*
* @since 3.0.0
*
* @param string $link The paginated link URL.
*/
$prev_link = '<a class="prev-div" href="'.esc_url(apply_filters('paginate_links', $link)).
'">prev</a>';
endif;
for ($n = 1; $n <= $total; $n++):
if ($n == $current):
$page_links[] = "<h3 class='page-numbers'>".$before_page_number.number_format_i18n($n).$after_page_number.
"</h3>";
$dots = true;
else :
if ($show_all || ($n <= $end_size || ($current && $n >= $current - $mid_size && $n <= $current + $mid_size) || $n > $total - $end_size)):
$link = str_replace('%_%', 1 == $n ? '' : $format, $base);
$link = str_replace('%#%', $n, $link);
if ($add_args)
$link = add_query_arg($add_args, $link);
$link.= $add_fragment;
/** This filter is documented in wp-includes/general-template.php */
$page_links[] = "<a class='page-numbers' href='".esc_url(apply_filters('paginate_links', $link)).
"'>".$before_page_number.number_format_i18n($n).$after_page_number.
"</a>";
$dots = true;
elseif($dots && !$show_all):
$page_links[] = '<span class="page-numbers dots">'.__('&hellip;').
'</span>';
$dots = false;
endif;
endif;
endfor;
$next_link = '<p class="next-div" >next</p>';
if ($prev_next && $current && ($current < $total || -1 == $total)):
$link = str_replace('%_%', $format, $base);
$link = str_replace('%#%', $current + 1, $link);
if ($add_args)
$link = add_query_arg($add_args, $link);
$link.= $add_fragment;
/** This filter is documented in wp-includes/general-template.php */
//$page_links[] = '<a class="next page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $next_text . '</a>';
$next_link = '<a class="next-div" href="'.esc_url(apply_filters('paginate_links', $link)).
'">next</a>';
endif;
switch ($type):
case 'array':
return $page_links;
break;
case 'list':
$r.= '<div class="pagination">';
$r.= $prev_link;
$r.= "<ul class='page-numbers'>\n\t<li>";
$r.= join("</li>\n\t<li>", $page_links);
$r.= "</li>\n</ul>\n";
$r.= $next_link;
$r.= '<div class="clear"></div></div>';
break;
default:
$r = join("\n", $page_links);
break;
endswitch;
return $r;
}

Now add some style rules to make it beautiful. You can add it according to your need . But here is an example .

.pagination {
background-color: #fff;
border: 1px solid #dddddd;
border-radius: 3px;
clear: both;
margin: 28px 0 0;
text-align: center;
}
.pagination ul li {
display: inline-block;
}
.pagination ul li a {
display: block;
font-size: 16px;
font-weight: 600;
padding: 0 10px 0 10px;
background: black;
color: #fff;
}
.prev-div,
.next-div {
background: #000;
color: #fff;
padding: 2px 5px 2px 5px;
display: inline-block;
}
ul.page-numbers {
display: inline-block;
margin: 0px;
padding: 0 5px 0 5px;
}
.pagination ul li a:hover {
color: #d75c43;
}
h3.page-numbers {
background: #000;
color: #fff;
padding: 1px 7px 6px 7px;
}

Now you can call the function where you need pagination .Replace the default pagination function with this

codingbin_pagination();

here is a demo code to use the pagination

if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() ); 
endwhile; ?>
//twentythirteen_paging_nav();  // remove default pagination
codingbin_pagination();   // add codingin beautiful pagination
else :
get_template_part( 'content', 'none' );
endif;
http://codingbin.com/wp-content/uploads/2015/11/my-first-blog-Just-another-WordPress-site-Page-31.pnghttp://codingbin.com/wp-content/uploads/2015/11/my-first-blog-Just-another-WordPress-site-Page-31-150x150.pngdevidcmsWordPresspagination,wordpressAlthough WordPress have its own pagination but it is only contains old posts or new posts . But this article will explain how to add a beautiful numbered pagination in your WordPress blogs . You just need to customize WordPress inbuilt functions. Here is the function you need to...coding, php, wordpress, yii, cakephp, and  jquery

Are you want to get implementation help, or modify or extend the functionality of this script? Submit paid service request