Title: Plugin have issue with paging
Last modified: February 25, 2022

---

# Plugin have issue with paging

 *  Resolved [varsachendra](https://wordpress.org/support/users/varsachendra/)
 * (@varsachendra)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-have-issue-with-paging/)
 * function setupPaginationSplitted(&$arr, $copyTopLevel, $arrayChildren) {
    if (
   $this->posts_per_page == 0) { $this->paginationMaxPage = -1; return; }
 *  $_childrenSizeBuff = 0;
    $itemsCount = $this->getCountArrayRecursive($arrayChildren,
   $_childrenSizeBuff); $this->paginationMaxPage = ceil($itemsCount / $this->posts_per_page);
 *  $currentPage = max($this->paged – 1, 0);
    //$currentPage = 0;// $itemsPerPage
   = $this->posts_per_page; $maxPage = max(($this->paginationMaxPage – 1), 0);
 *  $arrayPages = array();
    $allowedIDs = $this->prepareArrayPages($arrayPages, 
   $copyTopLevel, $arrayChildren, $currentPage, $itemsPerPage, $maxPage);
 *  $new_arr = array();
    $arr_copy = $arr; $this->dropNotIncluded($arr, $allowedIDs,
   $new_arr); $arr = $new_arr;
 *  if ($currentPage > 0) {
    $prev_arrayPages = array(); $prev_allowedIDs = $this-
   >prepareArrayPages($prev_arrayPages, $copyTopLevel, $arrayChildren, ($currentPage–
   1), $itemsPerPage, $maxPage); $prev_new_arr = array(); $this->dropNotIncluded(
   $arr_copy, $prev_allowedIDs, $prev_new_arr); $this->previousPage = $prev_new_arr;//
   print_r($this->previousPage); } }
 * If $currentPage = 0 is wrong line
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-have-issue-with-paging%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [click5](https://wordpress.org/support/users/click5/)
 * (@click5)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-have-issue-with-paging/#post-15409874)
 * Hello [@varsachendra](https://wordpress.org/support/users/varsachendra/),
 * Thank you for reporting this issue!
 * We will include a fix in the next version of our plugin – v1.0.35, which we’re
   currently working on.
 * I will keep you posted.
 * Thanks,
    click5 Team
 *  Plugin Author [click5](https://wordpress.org/support/users/click5/)
 * (@click5)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-have-issue-with-paging/#post-15440370)
 * Hello [@varsachendra](https://wordpress.org/support/users/varsachendra/)
 * We’ve just released a new version of our plugin – v1.0.35, which includes many
   bug fixes and improvements comparing to the previous version, including the one
   which you were facing.
 * Please give it a try and let us know if you would spot any other issues.
 * Thanks,
    click5 Team

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin have issue with paging’ is closed to new replies.

 * ![](https://ps.w.org/sitemap-by-click5/assets/icon-256x256.gif?rev=2728346)
 * [Sitemap by click5](https://wordpress.org/plugins/sitemap-by-click5/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sitemap-by-click5/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sitemap-by-click5/)
 * [Active Topics](https://wordpress.org/support/plugin/sitemap-by-click5/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sitemap-by-click5/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sitemap-by-click5/reviews/)

## Tags

 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 2 replies
 * 2 participants
 * Last reply from: [click5](https://wordpress.org/support/users/click5/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-have-issue-with-paging/#post-15440370)
 * Status: resolved