wordpress 代码实现分页

分页符调用:

<?php echo paginate_links(array(
    'prev_next'          => 0,
    'before_page_number' => '',
    'mid_size'           => 2,
));?>

分页CSS:

/*分页样式*/
.posts-nav {
	font-size: 14px;
	color:#000000;
	padding: 10px 0;
	margin: 0 auto;
	line-height:23px;text-align:center;
}
.posts-nav .page-numbers {
	border-radius: 3px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	display: inline-block;
	text-align: center;
	width: 30px;
	line-height: 30px;
	margin: 0 5px;
}
.posts-nav .page-numbers.current, .posts-nav .page-numbers:not(.dots):hover {
	background: #1F7508;
	border-color: #1F7508;
	color: #fff;
}
.posts-nav .page-numbers.dots {
	border-color: rgba(0,0,0,0)
}