Created
June 21, 2012 22:42
-
-
Save quangbahoa/2969061 to your computer and use it in GitHub Desktop.
wordpress.com.vn
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
.page_nav .page-numbers{ | |
padding:4px 8px; | |
margin:0px 4px; | |
border:1px solid gray; | |
color:#FFB134; | |
} | |
.page_nav .current{ | |
border:1px solid #FFB134; | |
background-color:#FBEFDB; | |
} | |
.page_nav .prev, .page_nav .next{ | |
border:none; | |
color:blue; | |
} |
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
<nav class="wp-prev-next"> | |
<ul class="clearfix"> | |
<li class="prev-link"><?php next_posts_link(_e('« Older Entries', 'WPVN')) ?></li> | |
<li class="next-link"><?php previous_posts_link(_e('Newer Entries »', 'WPVN')) ?></li> | |
</ul> | |
</nav> |
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
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1){ | |
$current_page = max(1, get_query_var('paged')); | |
echo paginate_links(array( | |
'base' => get_pagenum_link(1) . '%_%', | |
'format' => '/page/%#%', | |
'current' => $current_page, | |
'total' => $total_pages, | |
)); | |
} |
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
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1){ | |
$current_page = max(1, get_query_var('paged')); | |
echo '<div class="page_nav">'; | |
echo paginate_links(array( | |
'base' => get_pagenum_link(1) . '%_%', | |
'format' => '/page/%#%', | |
'current' => $current_page, | |
'total' => $total_pages, | |
'prev_text' => 'Prev', | |
'next_text' => 'Next' | |
)); | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment