https://github.com/palmtreephp/wp-pagination
:palm_tree: WordPress pagination component for Palmtree PHP
https://github.com/palmtreephp/wp-pagination
bootstrap composer-package pagination php wordpress wordpress-pagination-component
Last synced: 11 months ago
JSON representation
:palm_tree: WordPress pagination component for Palmtree PHP
- Host: GitHub
- URL: https://github.com/palmtreephp/wp-pagination
- Owner: palmtreephp
- License: mit
- Created: 2017-11-01T15:05:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T10:33:54.000Z (about 4 years ago)
- Last Synced: 2024-11-15T02:58:29.960Z (over 1 year ago)
- Topics: bootstrap, composer-package, pagination, php, wordpress, wordpress-pagination-component
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Palmtree WordPress Pagination
WordPress pagination component for Palmtree PHP
Generates pagination for the main WP_Query or any query provided and outputs with Bootstrap v4 classes.
## Requirements
* PHP >= 7.1
## Installation
Use composer to add the package to your dependencies:
```bash
composer require palmtree/wp-pagination
```
## Usage
#### Basic
```php
getHtml();
// __toString() is also implemented, which implicitly calls getHtml()
echo $pagination;
// Or get an array of unstyled links
$links = $pagination->getLinks();
```
#### Advanced
```php
setQuery($query);
$pagination
->addArg('prev_text', 'Previous')
->addArg('next_text', 'Next');
```
## License
Released under the [MIT license](LICENSE)