<div class="tablenav"><?php global $wp_rewrite;
$paginate_base = get_pagenum_link(1);
if (strpos($paginate_base, '?') || ! $wp_rewrite->using_permalinks()) {
$paginate_format = '';
$paginate_base = add_query_arg('paged', '%#%');
} else {
$paginate_format = (substr($paginate_base, -1 ,1) == '/' ? '' : '/') .
user_trailingslashit('page/%#%/', 'paged');;
$paginate_base .= '%_%';
}
echo paginate_links( array(
'base' => $paginate_base,
'format' => $paginate_format,
'total' => $wp_query->max_num_pages,
'mid_size' => 5,
'current' => ($paged ? $paged : 1),
)); ?></div>
//////////////////// you can use this css ////////////////////////
.tablenav {
color: #2583ad;
background:white;
margin: 1em auto;
line-height:2em;
text-align:center;
}
a.page-numbers, .tablenav .current {
color: #00019b;
padding: 2px .4em;
border:solid 1px #ccc;
text-decoration:none;
font-size:smaller;
}
a.page-numbers:hover {
color:white;
background: #328ab2;
}
.tablenav .current {
color: white;
background: #328ab2;
border-color: #328ab2;
font-weight:bold:
}
.tablenav .next, .tablenav .prev {
border:0 none;
background:transparent;
text-decoration:underline;
font-size:smaller;
font-weight:bold;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.