Today fusionpeach.com is keep growing up. I’ve already released 22 articles and now you can see only 10 latest posts. Therefore we need to add a new wordpress plugin or create it by ourself to help us access the old page. That’s sure, fusionpeach is my classroom. For knowledge I’ll try to do everything by my self. Let’s start!
1. Browse to you theme folder and open file “function.php” then paste the following code.
<?php
function fusion_pagination($pages = '', $range = 2){
$showitems = ($range * 2)+1;global $paged;
if(empty($paged)) $paged = 1;
if($pages == ''){
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages){
$pages = 1;
}
}
if(1 != $pages){
echo "<div class='pagination'><span class='textpage'>".PAGE."</span>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>«</a>";
if($paged > 1 && $showitems < $pages) echo "<a href='.get_pagenum_link($paged – 1).'>‹</a>";
for ($i=1; $i <= $pages; $i++){
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )){
echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
}
}
if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>›</a>";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>»</a>";
echo "</div>\n";
}
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
?>
2. After we already have a function, we need to call it by open file “index.php” then write the function call below. (I placed it before the line for get wordpress sidebar tag)
<?php fusion_pagination($additional_loop->max_num_pages); ?>
3. Now we can access to the older ten post but we still need to decor it a bit by putting following CSS.
/* --------Pagination------------*/
.pagination {
clear: both;
padding: 0 20px;
position: relative;
font-size: 11px;
line-height: 13px;
}
.pagination span, .pagination a {
display: block;
float: left;
margin: 2px 2px 2px 0;
padding: 6px 9px 5px 9px;
text-decoration: none;
width: auto;
color: #fff;
background: #555;
}
.pagination a:hover{
color: #fff;
background: #3279BB;
}
.pagination span.textpage {
background: none;
color: #000;
}
.pagination .current{
padding: 6px 9px 5px 9px;
background: #3279BB;
color: #fff;
}
4. Repeat place the code that show in No.2 into “search.php” and “archive.php”. Here is the result.

