why pagination not show up on my site?
-
that’s weird, my site almost not work with any code, even WP-pagenavi plugin. But when I try it on another site with same theme, it works perfectly.
What’s wrong?? you have any ideals?this my pagination code :
function wapvn_page_nav() { global $wp_query, $paged; $total = $wp_query->max_num_pages; if(!$total) $total = 1; if(empty($paged)) $paged = 1; if($total > 1) { $out = array(); if($total > 5) { if($paged > 1) $out[] = '[<a class="pagenav" href="' . get_pagenum_link($paged - 1) . '"><<</a>]'; if($paged > 3) $out[] = '[<a class="pagenav" href="' . get_pagenum_link(1) . '">1</a>]'; if($paged > 4) $out[] = '<span style="font-weight: bold;">←</span>'; } for ($i = 1; $i < ($total + 1); $i++) { if (!($i >= ($paged + 3) || $i <= ($paged - 3)) || $total <= 5) { if ($i == $paged) { $out[] = '<span class="page larger"><b>' . $i . '</b></span>'; } else { $out[] = '<a class="page larger" href="' . get_pagenum_link($i) . '">' . $i . '</a>'; } } } if ($total > 5) { if ($total > ($paged + 3)) $out[] = '<span style="font-weight: bold;">→</span>'; if ($total > ($paged + 2)) $out[] = '[<a class="pagenav" href="' . get_pagenum_link($total) . '">' . $total . '</a>]'; if ($total > $paged) $out[] = '[<a class="pagenav" href="' . get_pagenum_link($paged + 1) . '">>></a>]'; } echo '<div class="wp-pagenavi">' . implode(' ', $out) . '</div>'; } }
here is my site that pagination not work :
https://wapsaigon.com/and the site with same theme but works perfectly :
https://hotgame247.comze.com/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘why pagination not show up on my site?’ is closed to new replies.