you have not mentioned if you have updated the wp-pagenavi options:
http://ww.wp.xz.cn/extend/plugins/wp-pagenavi/screenshots/
yeah for sure. But i can change whatever i need in wp-pagenavi options, nothing changes on the blog.
Any cached plugin actived too.
^replace “whatever i need” by “whatever i want”.
sorry
ignore(you are right – I just activated wp_pagenavi, and the plugin seem to ignore those settings.)
turns out that the theme is not using wp_pagenavi at all;
the pagination is made by this function leaf_pagination() in the theme’s sub folder /includes/theme-plugins.php
ok, i get it. Right here isn’t it?
function leaf_pagination($pages = '', $range = 3) { /* handle pagination for post pages*/
$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>Page ".$paged." of ".$pages."</span>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>";
if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</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)."\">Next ›</a>";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>";
echo "</div>\n";
}
} // leaf_pagination
it’s a lil bit complicated for me.
i was wondering if someone had at least a working plugin to do this.
Im scared to do a mistake by editing this.
Or do i need to do something particular that can help WPPageNavi working?
@koustourika – See where it says
function leaf_pagination($pages = '', $range = 3)
On the first line, bump the 3 up to a higher number.
Great. Works like a charm 😉
good job.