WordPress maintenance or security needs? Reach out!
TLDWP

Plugin: wp-pagenavi (Used by 76,723 domains)

WP-PageNavi

๐Ÿ‘ค Lester Chan ๐Ÿ”— Plugin Homepage

Want to replace the old โ† Older posts | Newer posts โ†’ links with some page links?

This plugin provides the wp_pagenavi() template tag which generates fancy pagination links.

Usage

In your theme, you need to find calls to next_posts_link() and previous_posts_link() and replace them.

In the Twentyten theme, it looks like this:



You would replace those two lines with this:


For multipart pages, you would look for code like this:


and replace it with this:

 'multipart' ) ); ?>

Go to WP-Admin -> Settings -> PageNavi for configuration.

Changing the CSS

If you need to configure the CSS style of WP-PageNavi, you can copy the pagenavi-css.css file from the plugin directory to your themeโ€™s directory and make your modifications there. This way, you wonโ€™t lose your changes when you update the plugin.

Alternatively, you can uncheck the โ€œUse pagenavi.css?โ€ option from the settings page and add the styles to your themeโ€™s style.css file directly.

Changing Class Names

There are filters that can be used to change the default class names that are assigned to page navigation elements.

Filters

  • wp_pagenavi_class_pages
  • wp_pagenavi_class_first
  • wp_pagenavi_class_previouspostslink
  • wp_pagenavi_class_extend
  • wp_pagenavi_class_smaller
  • wp_pagenavi_class_page
  • wp_pagenavi_class_current
  • wp_pagenavi_class_larger
  • wp_pagenavi_class_nextpostslink
  • wp_pagenavi_class_last

Filter Usage

// Simple Usage - 1 callback per filter
add_filter('wp_pagenavi_class_previouspostslink', 'theme_pagination_previouspostslink_class');
add_filter('wp_pagenavi_class_nextpostslink', 'theme_pagination_nextpostslink_class');
add_filter('wp_pagenavi_class_page', 'theme_pagination_page_class');

function theme_pagination_previouspostslink_class($class_name) {
  return 'pagination__control-link pagination__control-link--previous';
}

function theme_pagination_nextpostslink_class($class_name) {
  return 'pagination__control-link pagination__control-link--next';
}

function theme_pagination_page_class($class_name) {
  return 'pagination__current-page';
}


// More Concise Usage - 1 callback for all filters
add_filter('wp_pagenavi_class_previouspostslink', 'theme_pagination_class');
add_filter('wp_pagenavi_class_nextpostslink', 'theme_pagination_class');
add_filter('wp_pagenavi_class_page', 'theme_pagination_class');

function theme_pagination_class($class_name) {
  switch($class_name) {
    case 'previouspostslink':
      $class_name = 'pagination__control-link pagination__control-link--previous';
      break;
    case 'nextpostslink':
      $class_name = 'pagination__control-link pagination__control-link--next';
      break;
    case 'page':
      $class_name = 'pagination__current'
      break;
  }
  return $class_name;
}

Development

Credits

Donations

I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.

DomainExposuresHeadersLast Checked
j*g*o*i.c*m.br (WP 7.1) F Aug 30, 2026
r*d*o*v*i*.com (WP 7.0.4) B Aug 30, 2026
k*n*i*n*t*e*k*p*.nl (WP 7.0.4) F Aug 30, 2026
h*n*n*f*d*k*.com (WP 7.1) F Aug 30, 2026
h*n*n*-*e.com (WP 4.9.26) F Aug 30, 2026
d*g*a*e*.info (WP 5.7.2) F Aug 30, 2026
c*a*r*o*.c*.jp F Aug 30, 2026
y*u*s*b*r*u*u*e.com F Aug 30, 2026
y*u*s*i*e*p*c*a*i*t*.com (WP 7.1) F Aug 30, 2026
h*n*n*-*i*o*h*m*.com F Aug 30, 2026
i*f*h*l*c*e*e*r*h.com (WP 5.6.11) A Aug 30, 2026
m*n*a*o*u*e.org F Aug 30, 2026
s*n*f*e*m*c*i*e*y.com (WP 7.1) F Aug 30, 2026
m*r*l*-*a*.com (WP 7.0.4) F Aug 30, 2026
u*e*u*l*e*e*p*u*p*p*.net (WP 7.1) F Aug 30, 2026
m*r*l*-*v*n*e.com (WP 3.2.1) F Aug 30, 2026
n*r*e*r*i*.com F Aug 30, 2026
b*s*o*j*o*k*u*h*e*.com (WP 7.1) F Aug 30, 2026
n*r*o*p.com F Aug 30, 2026
w*w*o*v*s*a*s.com F Aug 30, 2026
w*w*o*m*t*o*.com F Aug 30, 2026
w*w*o*g*a*h*c*.com F Aug 30, 2026
w*w*o*d*s*g*.com F Aug 30, 2026
w*w*o*c*e*t*v*.com F Aug 30, 2026
w*w*o*c*n*e*t.com F Aug 30, 2026
l*c*e*l*d*.com (WP 6.1.12) F Aug 30, 2026
y*u*s*i*d*a.com A Aug 30, 2026
r*d*o*e*e*a*a*b*s.com (WP 7.1) B Aug 30, 2026
t*n*o*i.com F Aug 30, 2026
t*n*a*s*i*h*b*n*d*u*.com (WP 7.1) F Aug 30, 2026
t*n*a*s*-*a*a*a.com (WP 7.1) F Aug 30, 2026
e*l*g*t*n*d*a*k*.com (WP 6.9.7) F Aug 30, 2026
b*s*o*u*a*n*i.com F Aug 30, 2026
b*s*a*o*-*i*i.com (WP 7.1) F Aug 30, 2026
s*s*b*k.hu (WP 6.8.8) F Aug 30, 2026
h*n*m*z*k*-*o*i*h*.com F Aug 30, 2026
h*n*m*z*k*n*k*i.com (WP 6.8.8) F Aug 30, 2026
e*l*g*t*n*e*t*v*n*s.com F Aug 30, 2026
h*n*m*z*k*-*a*p*r*.com (WP 7.1) F Aug 30, 2026
h*n*m*z*k*-*a*u*a.com (WP 5.0.22) F Aug 30, 2026
s*n*u*.com (WP 3.7.4) F Aug 30, 2026
c*k*v*p*r*d*.com F Aug 30, 2026
t*l*u*t*c*.eu (WP 6.4.10) F Aug 30, 2026
j*i*n*x*p*.com C Aug 30, 2026
h*n*m*r*h*n*m*r*.com (WP 7.1) F Aug 30, 2026
h*n*m*r*-*i*c*e*.com (WP 5.8.15) F Aug 30, 2026
j*i*m*m*.com (WP 7.1) D Aug 30, 2026
b*s*r*t*a*i*.com D Aug 30, 2026
s*-*a*y*-*o*n*r.c*.uk F Aug 30, 2026
t*c*i*o*t*u*.com (WP 3.9.40) F Aug 30, 2026
e*h*s*n*.fr D Aug 30, 2026
y*s*d*-*e*g*o.c*.jp (WP 6.8.8) F Aug 30, 2026
r*n*o*a*c*i.o*.jp F Aug 30, 2026
m*r*w*l*o*w*i*e*s*u*f.com (WP 5.6.11) A Aug 30, 2026
h*n*m*r*t*i*.com F Aug 30, 2026
g*r*t*i*.us (WP 7.0.4) F Aug 30, 2026
i*h*y*u.o*.jp D Aug 30, 2026
n*k*n*h*n*o.com (WP 7.1) F Aug 30, 2026
n*k*k*g*w*.com F Aug 30, 2026
c*e*m*g*z*n*.com F Aug 30, 2026
s*n*a*t*c*.com F Aug 30, 2026
l*c*n*s*3*0.com F Aug 30, 2026
h*n*k*t*n*m*t*.com F Aug 30, 2026
b*s*r*t*l*-*a*l*.com (WP 7.1) F Aug 30, 2026
h*n*k*m*c*i*k.com (WP 6.7.7) F Aug 30, 2026
h*n*k*m*c*i*7.com F Aug 30, 2026
t*n*n*o*o*t*b*l*d*d*.com (WP 6.9.7) F Aug 30, 2026
m*t*-*o*r*a*.fr D Aug 30, 2026
m*t*r*v*e.com D Aug 30, 2026
l*c*e*s*a*e*y.com F Aug 30, 2026
a*c*k.com F Aug 30, 2026
a*e*a*d*e*e*m*t*.info D Aug 30, 2026
p*i*a*i*i*.c*m.br (WP 7.1) F Aug 30, 2026
k*o*o*t*g*t*.c*.jp F Aug 30, 2026
a*c*t*.com F Aug 30, 2026
s*n*o*s*m*n*r.com (WP 4.3.9) F Aug 30, 2026
s*n*o*o*h*k*.com F Aug 30, 2026
s*n*i*t*n*.com F Aug 30, 2026
s*i*h*a*c*.com F Aug 30, 2026
m*r*u*v*n*k*.com F Aug 30, 2026
l*f*s*g*p*e*s.com (WP 6.8.8) F Aug 30, 2026
a*l*o*h*l*a.com (WP 6.8.3) F Aug 30, 2026
b*o*d*n*t*e*-*n*v*y*g*.fr (WP 7.0.4) D Aug 30, 2026
t*e*o*s*i*i*.cz F Aug 30, 2026
s*n*i*s.com (WP 7.1) F Aug 30, 2026
n*e*m*r*n*-*l*c*r*n*c*.com B Aug 30, 2026
n*e*i*s*r*m*n*a*i*n.com F Aug 30, 2026
n*e*g*o*p.com F Aug 30, 2026
n*e*c*r*o*a*e.com F Aug 30, 2026
e*k*u*i*t*y*m*.com F Aug 30, 2026
r*d*o*d*r.com F Aug 30, 2026
w*w*h*w.com F Aug 30, 2026
w*w*h*w*v*d*o*.com F Aug 30, 2026
w*w*h*w*g*a*h*c*.com F Aug 30, 2026
w*v*o*.com (WP 7.1) F Aug 30, 2026
b*s*r*-*a*o*o.com (WP 7.1) F Aug 30, 2026
b*s*r*-*o*y*.com (WP 7.1) F Aug 30, 2026
b*s*r*-*r*e.com (WP 5.5.20) F Aug 30, 2026
h*n*i*e*i.com F Aug 30, 2026
s*n*y*e*.com F Aug 30, 2026

Top 50 Plugins

Plugin Count
elementor 1,739,879
contact-form-7 1,728,571
elementor-pro 1,036,011
woocommerce 803,836
revslider 595,230
jetpack 447,273
js_composer 410,518
wp-rocket 330,484
essential-addons-for-elementor-lite 259,207
gravityforms 253,754
complianz-gdpr 253,072
google-site-kit 244,139
cookie-law-info 224,490
instagram-feed 220,952
sitepress-multilingual-cms 207,215
header-footer-elementor 201,775
google-analytics-for-wordpress 200,589
bluehost-wordpress-plugin 189,941
elementskit-lite 175,301
gutenberg 168,994
litespeed-cache 145,456
cookie-notice 145,433
gutenberg-core 143,862
gtranslate 121,507
the-events-calendar 121,062
wpforms-lite 119,506
astra-sites 109,584
popup-maker 107,489
woocommerce-payments 107,266
tablepress 101,602
honeypot 96,925
coblocks 96,563
astra-addon 91,882
duracelltomi-google-tag-manager 88,934
wp-smushit 88,823
layerslider 86,910
all-in-one-seo-pack 86,830
bb-plugin 85,005
akismet 83,406
ml-slider 82,207
premium-addons-for-elementor 81,462
cleantalk-spam-protect 80,681
mailchimp-for-wp 79,409
megamenu 78,992
ewww-image-optimizer 77,089
jet-engine 76,822
wp-pagenavi 76,733
fusion-builder 75,643
smart-slider-3 74,607
gravityformsrecaptcha 73,036

Top 50 Themes

Theme Count
hello-elementor 612,295
Divi 486,125
astra 405,338
flatsome 144,818
Avada 118,959
generatepress 112,712
pub 99,638
oceanwp 78,635
kadence 77,926
enfold 67,274
salient 63,779
twentyseventeen 53,353
twentytwentyfour 52,364
bb-theme 51,882
betheme 51,743
cocoon-master 50,235
blocksy 50,123
h4 50,093
twentytwentyfive 45,632
woodmart 44,793
dt-the7 44,690
neve 37,240
Avada-Child-Theme 36,501
gox 36,054
lightning 30,739
bridge 30,461
twentytwentyone 29,596
swell 29,230
twentytwenty 28,207
bricks 26,753
Impreza 25,647
Newspaper 23,752
twentytwentythree 21,574
epik-redesign 18,885
twentytwentytwo 18,351
uncode 18,083
twentysixteen 17,413
pro 17,359
storefront 15,909
sydney 15,821
Total 14,147
factory-templates-4 13,842
hello-theme-child-master 13,745
themify-ultra 12,760
hestia 12,351
yootheme 12,311
yith-wonder 11,791
porto 11,659
jupiter 11,647
twentyfifteen 11,546