Skip to content

Instantly share code, notes, and snippets.

@trangsihung
Last active July 26, 2017 02:34
Show Gist options
  • Save trangsihung/1f75e439a1393f40ee4459dc667a6c84 to your computer and use it in GitHub Desktop.
Save trangsihung/1f75e439a1393f40ee4459dc667a6c84 to your computer and use it in GitHub Desktop.
phan-trang-wordpress-khong-dung-plugin.html
.page_nav .page-numbers{
background:#BCBCBC;
color:#fff;
display:block;
width:auto;
float:left;
margin: 4px 4px 4px 0;
padding:15px 18px 14px 18px;
text-decoration:none;
}
.page_nav .page-numbers:hover{
background: #24221D;
color:#fff;
text-decoration: none;
}
.page_nav .current{
background: #24221D;
color:#fff;
padding:15px 18px 14px 18px;
}
<?php
if ( ! function_exists( 'wplift_pagination' ) ) {
function wplift_pagination() {
global $wp_query;
$big = 999999999;
echo '<div class="page_nav">';
echo 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 ) );
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment