PHP code example of bojaghi / pagination
1. Go to this page and download the library: Download bojaghi/pagination library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bojaghi / pagination example snippets
$p = new Pagination($wp_query);
// create() 를 호출할 필요가 없습니다.
$begin = $p->getBegin();
$end = $p->getEnd();
$p = new Pagination();
$p->setQuery($wp_query);
// create() 를 호출할 필요가 없습니다.
$begin = $p->getBegin();
$end = $p->getEnd();
$p = new Pagination();
$p
->setSize(5) // 페이지네이션 길이. 기본 5.
->setNumItems(10) // 한 페이징당 표시할 아이템 수.
->setTotal(130) // 모든 게시물의 수.
->setCurrent(2) // 현재 페이지.
->create() // 반드시 create() 함수를 호출해야 합니다.
;
$begin = $p->getBegin();
$end = $p->getEnd();