Hmm I can’t reproduce this on my end on https://lesterchan.net/wordpress/. What settings are you using?
I encounter the same issue with the latest version and had to roll back to the previous which resolved the issue. I am using a filter which may be part of whats causing the incompatibility. See below:
add_filter( 'wp_pagenavi', 'cfmm_pagination', 10, 2 );
function cfmm_pagination($html) {
$out = '';
//wrap a's and span's in li's
$out = str_replace("<div","",$html);
$out = str_replace("class='wp-pagenavi'>","",$out);
$out = str_replace("<a","<li><a",$out);
$out = str_replace("</a>","</a></li>",$out);
$out = str_replace("<span","<li><span",$out);
$out = str_replace("</span>","</span></li>",$out);
$out = str_replace("</div>","",$out);
return '<ul class="pagination pagination-centered">'.$out.'</ul>';
}
Ah! because you did an HTML replacement and hence it breaks. This is very brittle. The latest version introduces some markup for accessibility.
You can see the changes https://github.com/lesterchan/wp-pagenavi/compare/8e593062522b30cfe5117e3f42b7129f10abf9d1..ba350b693b1325d92f0fdd9610cad51f2b097541 and modify your filter accordingly.
I’m using a similar filter as above and cannot go and update 50 websites that I’ve done for clients over the years. Whatever markup was introduced will break these websites unfortunately.
I’d like to add that the reason for this filter is for compatibility with Bootstrap 3.
-
This reply was modified 2 years, 3 months ago by
jkuzma.
-
This reply was modified 2 years, 3 months ago by
jkuzma.
A fix for sites you have access to the above function is as follows. Replace
$out = str_replace("class='wp-pagenavi'>","",$out);
with
$out = str_replace("class='wp-pagenavi' role='navigation'>","",$out);
Hope this helps those who come across this thread.