Last active
August 29, 2015 14:09
-
-
Save leobaiano/46c536a502d56d204da8 to your computer and use it in GitHub Desktop.
Páginação WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( 'big_number' => 999999999, | |
'base' => str_replace( 999999999, '%#%', get_pagenum_link( 999999999 ) ), | |
'format' => '?paged=%#%', | |
'current' => max( 1, get_query_var( 'paged' ) ), | |
'total' => $wp_query->max_num_pages, | |
'prev_next' => true, | |
'end_size' => 1, | |
'mid_size' => 4, | |
'type' => 'list' | |
); | |
echo '<div class="box_paginacao">'; | |
echo paginate_links( $args ); | |
echo '</div>'; | |
/* ---- CSS PAGINAÇÃO WORDPRESS ---- */ | |
.box_paginacao{ | |
clear: both; | |
} | |
ul.page-numbers li{float:left;margin:0 2px;} | |
ul.page-numbers a, ul.page-numbers span { | |
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
box-shadow:inset 0px 1px 0px 0px #ffffff; | |
background-color:transparent; | |
-moz-border-radius:4px; | |
-webkit-border-radius:4px; | |
border-radius:4px; | |
border:1px solid #dcdcdc; | |
display:inline-block; | |
color:#777777; | |
font-family:arial; | |
font-size:15px; | |
font-weight:bold; | |
padding:2px 6px; | |
text-decoration:none; | |
text-shadow:1px 1px 0px #ffffff; | |
} | |
ul.page-numbers a:active, ul.page-numbers span:active { | |
position:relative; | |
top:1px; | |
} | |
ul.page-numbers a:hover, ul.page-numbers span.current{ | |
-moz-box-shadow:inset 0px 1px 0px 0px #d9d9d9; | |
-webkit-box-shadow:inset 0px 1px 0px 0px #d9d9d9; | |
box-shadow:inset 0px 1px 0px 0px #d9d9d9; | |
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d9d9d9), color-stop(1, #676767) ); | |
background:-moz-linear-gradient( center top, #d9d9d9 5%, #676767 100% ); | |
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d9d9d9', endColorstr='#676767'); | |
background-color:#d9d9d9; | |
border:1px solid #676767; | |
display:inline-block; | |
color:#ffffff; | |
font-family:arial; | |
font-size:15px; | |
font-weight:bold; | |
text-decoration:none; | |
text-shadow:1px 1px 0px #676767; | |
} | |
ul.page-numbers {text-align:center; padding: 20px 0;width: 100%; list-style: none;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment