WordPress WP-PageNavi Not working on Home Page

I have came across this problem lately in one of the wordpress theme SevenMag.
I searched for a long hours of time and was not able to beat it. The wp-pagenavi function was inside the theme and I was not using as a plugin.

I tried installing the plugin instead hoping that it will work and tried to make the default wp-pagenavi option to disable.
But I couldn’t get luck on that either. My problem was the pagination error on home page only that I was clicking the Page 2, 3, 4, … it still returned me Page 1.
So I got through this solution of code.

I replaced all the

or if you have any other form like

Just change it to

If that doesn’t work try

The bottom line is just replace

‘paged’ Key Value to get_query_var(‘paged’) or get_query_var(‘page’) which ever suits your case in the PHP files where ever your theme have included it.
In my case it was 3 files page.php, pagination-blank.php, pagination-slideshow.php

And you might get a working pagination with WP-PageNavi.

924 total views, 1 views today

Comments (3)

  1. Hi, I have the same problem with Sevenmag theme like you. But I can’t find a page.php, pagination-blank.php, pagination-slideshow.php. Could you help me please. I’am novice in WordPress. Thank you very much and sorry for my bad English… 😀

Leave a Comment